Skip to content

Commit

Permalink
chore: Init always set a key
Browse files Browse the repository at this point in the history
  • Loading branch information
zombieJ committed Jun 1, 2020
1 parent 57aa402 commit dfce80b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Tabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ function Tabs(
}, []);

// ====================== Active Key ======================
const [mergedActiveKey, setMergedActiveKey] = useMergedState<string>(undefined, {
const [mergedActiveKey, setMergedActiveKey] = useMergedState<string>(() => tabs[0]?.key, {
value: activeKey,
defaultValue: defaultActiveKey,
});
Expand Down

0 comments on commit dfce80b

Please sign in to comment.