Skip to content

Commit

Permalink
fix: recalculate tabSizes when tabs order changed (#293)
Browse files Browse the repository at this point in the history
* fix: recalculate tabSizes when tabs order  changed

* memoization

* Revert "memoization"

This reverts commit cbe5af2.
  • Loading branch information
Yu Mao authored Jul 1, 2020
1 parent f356f33 commit f00e40f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/TabNavList/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ function TabNavList(props: TabNavListProps, ref: React.Ref<HTMLDivElement>) {
// Should recalculate when rtl changed
useEffect(() => {
onListHolderResize();
}, [rtl, tabBarGutter, activeKey]);
}, [rtl, tabBarGutter, activeKey, tabs.map((tab) => tab.key).join('_')]);

// ========================= Render ========================
const hasDropdown = !!hiddenTabs.length;
Expand Down

1 comment on commit f00e40f

@vercel
Copy link

@vercel vercel bot commented on f00e40f Jul 1, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.