From c568e8bdd6e9e770e0ededd55ba83ca0f7691ea9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=8C=E8=B4=A7=E6=9C=BA=E5=99=A8=E4=BA=BA?= Date: Fri, 3 Jan 2025 15:06:13 +0800 Subject: [PATCH] docs: back --- examples/basic.tsx | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/examples/basic.tsx b/examples/basic.tsx index d63f27d..2f14a20 100644 --- a/examples/basic.tsx +++ b/examples/basic.tsx @@ -10,8 +10,7 @@ const MyItem: React.ForwardRefRenderFunction = ({ id }, ref) => ( { @@ -45,7 +44,7 @@ const TYPES = [ ]; const onScroll: React.UIEventHandler = (e) => { - // console.log('scroll:', e.currentTarget.scrollTop); + console.log('scroll:', e.currentTarget.scrollTop); }; const Demo = () => { @@ -54,12 +53,6 @@ const Demo = () => { const [type, setType] = React.useState('dom'); const listRef = React.useRef(null); - React.useEffect(() => { - listRef.current.scrollTo({ - index: 99999999, - }); - }, []); - return (