Skip to content

Commit

Permalink
fix: rename
Browse files Browse the repository at this point in the history
  • Loading branch information
ValeraS committed Dec 11, 2024
1 parent c1fd5a0 commit 87b755d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/lab/Virtualizer/useLoadMore.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ export function useLoadMore(
};
}, [scrollContainerRef, onLoadMore, scrollOffset]);

const loadingRef = React.useRef(loading);
const prevLoadingPropRef = React.useRef(loading);
React.useLayoutEffect(() => {
if (loading !== loadingRef.current) {
if (loading !== prevLoadingPropRef.current) {
isLoadingRef.current = loading;
loadingRef.current = loading;
prevLoadingPropRef.current = loading;
}

const element = scrollContainerRef.current;
Expand Down

0 comments on commit 87b755d

Please sign in to comment.