From f00e40ff18f3452d14d9812f560c67328c0b7e4f Mon Sep 17 00:00:00 2001 From: Yu Mao Date: Wed, 1 Jul 2020 22:27:54 +0800 Subject: [PATCH] fix: recalculate tabSizes when tabs order changed (#293) * fix: recalculate tabSizes when tabs order changed * memoization * Revert "memoization" This reverts commit cbe5af2e436bf6c0a43752bada3e1a3a05eda8d9. --- src/TabNavList/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/TabNavList/index.tsx b/src/TabNavList/index.tsx index cb607cd2..83901f06 100644 --- a/src/TabNavList/index.tsx +++ b/src/TabNavList/index.tsx @@ -355,7 +355,7 @@ function TabNavList(props: TabNavListProps, ref: React.Ref) { // Should recalculate when rtl changed useEffect(() => { onListHolderResize(); - }, [rtl, tabBarGutter, activeKey]); + }, [rtl, tabBarGutter, activeKey, tabs.map((tab) => tab.key).join('_')]); // ========================= Render ======================== const hasDropdown = !!hiddenTabs.length;