Skip to content

Commit

Permalink
fix(tabs): fix tabs onchange trigger multiple items (#2588)
Browse files Browse the repository at this point in the history
Co-authored-by: Heising <heising@travelconnect.cn>
  • Loading branch information
HaixingOoO and Heising authored Nov 3, 2023
1 parent c046411 commit 55bddb0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/tabs/TabNav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,9 @@ const TabNav: React.FC<TabNavProps> = (props) => {

const handleTabItemClick = (clickItem) => {
tabClick(clickItem.value);
onChange(clickItem.value);
if (activeValue !== clickItem.value) {
onChange(clickItem.value);
}
clickItem?.onClick?.(clickItem.value);
};

Expand Down

0 comments on commit 55bddb0

Please sign in to comment.