File tree 1 file changed +9
-7
lines changed
1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -335,13 +335,15 @@ angular.module('ui.grid')
335
335
336
336
var newRange = [ ] ;
337
337
if ( rowCache . length > self . grid . options . virtualizationThreshold ) {
338
- // Have we hit the threshold going down?
339
- if ( self . prevScrollTop < scrollTop && rowIndex < self . prevRowScrollIndex + self . grid . options . scrollThreshold && rowIndex < maxRowIndex ) {
340
- return ;
341
- }
342
- //Have we hit the threshold going up?
343
- if ( self . prevScrollTop > scrollTop && rowIndex > self . prevRowScrollIndex - self . grid . options . scrollThreshold && rowIndex < maxRowIndex ) {
344
- return ;
338
+ if ( ! ( typeof ( scrollTop ) === 'undefined' || scrollTop === null ) ) {
339
+ // Have we hit the threshold going down?
340
+ if ( self . prevScrollTop < scrollTop && rowIndex < self . prevRowScrollIndex + self . grid . options . scrollThreshold && rowIndex < maxRowIndex ) {
341
+ return ;
342
+ }
343
+ //Have we hit the threshold going up?
344
+ if ( self . prevScrollTop > scrollTop && rowIndex > self . prevRowScrollIndex - self . grid . options . scrollThreshold && rowIndex < maxRowIndex ) {
345
+ return ;
346
+ }
345
347
}
346
348
347
349
var rangeStart = Math . max ( 0 , rowIndex - self . grid . options . excessRows ) ;
You can’t perform that action at this time.
0 commit comments