From 87b755d8a6d3c56187abd3d4733111f3733818d8 Mon Sep 17 00:00:00 2001 From: Valerii Sidorenko Date: Wed, 11 Dec 2024 11:19:33 +0100 Subject: [PATCH] fix: rename --- src/components/lab/Virtualizer/useLoadMore.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/lab/Virtualizer/useLoadMore.tsx b/src/components/lab/Virtualizer/useLoadMore.tsx index 949fc1da9..d029f2a8b 100644 --- a/src/components/lab/Virtualizer/useLoadMore.tsx +++ b/src/components/lab/Virtualizer/useLoadMore.tsx @@ -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;