From 65943e33b9e894134c597beb4b2c6e3a73c0f984 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E6=B6=9B?= Date: Thu, 23 Mar 2023 08:47:03 +0800 Subject: [PATCH] =?UTF-8?q?enhance(view):=E8=B0=83=E6=95=B4=E8=99=9A?= =?UTF-8?q?=E6=8B=9F=E5=88=97=E8=A1=A8=E6=BB=9A=E5=8A=A8=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=EF=BC=8C=E9=81=BF=E5=85=8D=E5=8D=A1=E9=A1=BF=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/ContinuationView.tsx | 2 +- src/components/FileList.tsx | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/components/ContinuationView.tsx b/src/components/ContinuationView.tsx index 226afca..87d1b33 100644 --- a/src/components/ContinuationView.tsx +++ b/src/components/ContinuationView.tsx @@ -25,7 +25,7 @@ export const ContinuationView: FC = () => { useEffect(() => { ebus?.addListener('navigate_offset', ({ filename }) => { let index = indexOf(filename, pluck('filename', files)); - virtualListRef.current?.scrollToIndex({ index, align: 'start', behavior: 'smooth' }); + virtualListRef.current?.scrollToIndex({ index, align: 'start' }); }); ebus?.addListener('reset_views', () => { virtualListRef.current?.scrollTo({ top: 0 }); diff --git a/src/components/FileList.tsx b/src/components/FileList.tsx index 17800bb..df0461d 100644 --- a/src/components/FileList.tsx +++ b/src/components/FileList.tsx @@ -27,8 +27,7 @@ export const FileList: FC = () => { let firstActivedIndex = indexOf(firstActived, pluck('filename', files)); listRef.current?.scrollToIndex({ index: firstActivedIndex, - align: 'center', - behavior: 'auto' + align: 'center' }); }, [activeFiles]);