Skip to content

Commit

Permalink
Performance improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
arminmeh committed Jan 9, 2025
1 parent ba2dd67 commit 112fb2c
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -318,12 +318,12 @@ export const useGridDataSourceLazyLoader = (

const handleScrolling: GridEventListener<'scrollPositionChange'> = React.useCallback(
(newScrollPosition) => {
if (rowsStale.current || loadingTrigger.current !== LoadingTrigger.SCROLL_END) {
return;
}

const renderContext = gridRenderContextSelector(privateApiRef);
if (
rowsStale.current ||
loadingTrigger.current !== LoadingTrigger.SCROLL_END ||
previousLastRowIndex.current >= renderContext.lastRowIndex
) {
if (previousLastRowIndex.current >= renderContext.lastRowIndex) {
return;
}

Expand Down

0 comments on commit 112fb2c

Please sign in to comment.