From 27b1865ea47de256586924af2ca306d6ffb971a1 Mon Sep 17 00:00:00 2001 From: sheepluo Date: Sun, 19 Nov 2023 12:30:41 +0800 Subject: [PATCH] fix: useElementLazyRender (#2605) --- src/hooks/useElementLazyRender.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hooks/useElementLazyRender.ts b/src/hooks/useElementLazyRender.ts index 7596c94093..b006d70017 100644 --- a/src/hooks/useElementLazyRender.ts +++ b/src/hooks/useElementLazyRender.ts @@ -3,7 +3,7 @@ import observe from '../_common/js/utils/observe'; export function useElementLazyRender(labelRef: MutableRefObject, lazyLoad: boolean) { const ioObserver = useRef(); - const [showElement, setShowElement] = useState(true); + const [showElement, setShowElement] = useState(!lazyLoad); const handleLazyLoad = () => { if (!lazyLoad || !labelRef.current || ioObserver.current) return;