From e84e7c54ce3da18cb7a31df738f5411e2dd996e8 Mon Sep 17 00:00:00 2001 From: lanten Date: Fri, 9 Jul 2021 18:07:35 +0800 Subject: [PATCH] fix: Sync scroll bar when data change (#646) --- src/Table.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Table.tsx b/src/Table.tsx index e05b9c359..6c144ebff 100644 --- a/src/Table.tsx +++ b/src/Table.tsx @@ -492,13 +492,13 @@ function Table(props: TableProps triggerOnScroll, []); React.useEffect(() => { if (horizonScroll) { triggerOnScroll(); } - }, [horizonScroll]); + }, [horizonScroll, data]); // ===================== Effects ====================== const [scrollbarSize, setScrollbarSize] = React.useState(0);