@@ -108,7 +108,7 @@ class GridRowScrollPinning extends Base {
108108 let me = this ,
109109 state = me . registrations . get ( id ) ;
110110
111- if ( ! state || ! state . wrapperNode || ! state . contentNode ) {
111+ if ( ! state || ! state . wrapperNode || ! state . contentNodes ?. length ) {
112112 return
113113 }
114114
@@ -119,9 +119,13 @@ class GridRowScrollPinning extends Base {
119119 // We explicitly ignore Wheel, Trackpad, Keyboard, and Body Drag scrolling,
120120 // allowing their native/custom physics to operate perfectly.
121121 if ( state . isThumbDragging ) {
122- state . contentNode . style . setProperty ( '--grid-row-pin-offset' , `${ deltaY } px` ) ;
123- } else if ( state . contentNode . style . getPropertyValue ( '--grid-row-pin-offset' ) !== '0px' ) {
124- state . contentNode . style . setProperty ( '--grid-row-pin-offset' , '0px' ) ;
122+ state . contentNodes . forEach ( node => {
123+ node . style . setProperty ( '--grid-row-pin-offset' , `${ deltaY } px` ) ;
124+ } ) ;
125+ } else if ( state . contentNodes [ 0 ] . style . getPropertyValue ( '--grid-row-pin-offset' ) !== '0px' ) {
126+ state . contentNodes . forEach ( node => {
127+ node . style . setProperty ( '--grid-row-pin-offset' , '0px' ) ;
128+ } ) ;
125129 }
126130 }
127131
@@ -139,7 +143,13 @@ class GridRowScrollPinning extends Base {
139143 }
140144
141145 me . registrations . forEach ( state => {
142- let bodyMeta = meta [ state . bodyId ] ;
146+ let bodyMeta ;
147+
148+ state . bodyIds . forEach ( bodyId => {
149+ if ( meta [ bodyId ] ) {
150+ bodyMeta = meta [ bodyId ] ;
151+ }
152+ } ) ;
143153
144154 if ( bodyMeta ) {
145155 // Silently update the baseline state.
@@ -235,21 +245,21 @@ class GridRowScrollPinning extends Base {
235245 /**
236246 * Registers a grid for row scroll pinning and attaches native scroll listener.
237247 * @param {Object } data
238- * @param {String } data.bodyId The ID of the grid body
248+ * @param {String[] } data.bodyIds The IDs of the grid body nodes
239249 * @param {String } data.bodyWrapperId The ID of the vertical scroll wrapper
240250 * @param {String } data.id Unique identifier for the registration (e.g. ScrollManager id)
241251 */
242- register ( { bodyId , bodyWrapperId, id} ) {
252+ register ( { bodyIds , bodyWrapperId, id} ) {
243253 let me = this ,
244254 wrapperNode = DomAccess . getElement ( bodyWrapperId ) ,
245- contentNode = DomAccess . getElement ( bodyId ) ;
255+ contentNodes = bodyIds . map ( bodyId => DomAccess . getElement ( bodyId ) ) . filter ( Boolean ) ;
246256
247- if ( wrapperNode && contentNode ) {
257+ if ( wrapperNode && contentNodes . length > 0 ) {
248258 me . registrations . set ( id , {
249259 id,
250- bodyId ,
260+ bodyIds ,
251261 wrapperNode,
252- contentNode ,
262+ contentNodes ,
253263 isThumbDragging : false ,
254264 scrollTimeoutId : null ,
255265 workerScrollTop : 0
0 commit comments