File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed 
src/features/infinite-scroll/js Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change 289289 } 
290290
291291 if  ( args . y )  { 
292+  if  ( args . y . percentage  ===  0  ||  args . y . percentage  ===  1 )  { 
293+  // User has scrolled all the way to the top/bottom. 
294+  // If the user is scrolling very quickly all the way to the top/bottom, the scroll handler can get confused 
295+  // about the direction. This ensures that more data always is loaded in this case. 
296+  args . grid . scrollDirection  =  args . y . percentage  ===  0  ? uiGridConstants . scrollDirection . UP  : uiGridConstants . scrollDirection . DOWN ; 
297+  service . loadData ( args . grid ) ; 
298+  return ; 
299+  } 
300+ 
292301 var  percentage ; 
293302 var  targetPercentage  =  args . grid . options . infiniteScrollRowsFromEnd  /  args . grid . renderContainers . body . visibleRowCache . length ; 
294303 if  ( args . grid . scrollDirection  ===  uiGridConstants . scrollDirection . UP  )  { 
                         You can’t perform that action at this time. 
           
                  
0 commit comments