@@ -11,9 +11,10 @@ class ScrollManager extends Base {
1111 * @static
1212 */
1313 static delayable = {
14- onBodyScroll : { type : 'throttle' , timer : 16 } ,
14+ // onBodyScroll : {type: 'throttle', timer: 10 },
1515 onBodyScrollEnd : { type : 'buffer' , timer : 150 } ,
16- onContainerScroll : { type : 'throttle' , timer : 16 }
16+ // onContainerScroll: {type: 'throttle', timer: 16},
17+ syncGridBody : { type : 'throttle' , timer : 10 }
1718 }
1819
1920 static config = {
@@ -94,14 +95,13 @@ class ScrollManager extends Base {
9495 * @protected
9596 */
9697 onBodyScroll ( { scrollTop} ) {
97- let me = this ,
98- body = me . gridBody ;
99-
100- me . scrollTop = scrollTop ;
98+ let me = this ;
10199
102- body . set ( { isScrolling : true , scrollTop} ) ;
100+ me . scrollTop = scrollTop ;
101+ me . gridBody . isScrolling = true ;
103102
104- me . onBodyScrollEnd ( )
103+ me . onBodyScrollEnd ( ) ;
104+ me . syncGridBody ( )
105105 }
106106
107107 /**
@@ -117,19 +117,36 @@ class ScrollManager extends Base {
117117 * @param {Object } data.target
118118 */
119119 onContainerScroll ( { scrollLeft, target} ) {
120- let me = this ,
121- body = me . gridBody ;
120+ let me = this ;
122121
123122 // We must ignore events for grid-scrollbar
124123 if ( target . id . includes ( 'grid-container' ) ) {
125- body . isScrolling = true ;
124+ me . scrollLeft = scrollLeft ;
125+ me . gridBody . isScrolling = true ;
126+
126127 me . onBodyScrollEnd ( ) ;
128+ me . syncGridBody ( )
129+ }
130+ }
127131
128- me . scrollLeft = scrollLeft ;
129- body . scrollLeft = scrollLeft ;
132+ /**
133+ * @protected
134+ */
135+ syncGridBody ( ) {
136+ let me = this ,
137+ body = me . gridBody ;
130138
131- me . gridContainer . headerToolbar . scrollLeft = scrollLeft
132- }
139+ body . skipCreateViewData = true ;
140+
141+ body . set ( {
142+ scrollLeft : me . scrollLeft ,
143+ scrollTop : me . scrollTop
144+ } ) ;
145+
146+ body . skipCreateViewData = false ;
147+ body . createViewData ( ) ;
148+
149+ me . gridContainer . headerToolbar . scrollLeft = me . scrollLeft
133150 }
134151
135152 /**
0 commit comments