Skip to content

Commit

Permalink
fix: tabas default value
Browse files Browse the repository at this point in the history
  • Loading branch information
Wangtaofeng committed Nov 24, 2023
1 parent 5beb5d7 commit f4bd338
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions packages/tabs/src/tabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,7 @@ export const Tabs = forwardRef<HTMLDivElement, TabsProps>((props, ref) => {
return getTabItems(children as ReactElement)
}, [children])

const [curTabItems, setCurTabItems] = useState<ReactElement[]>(
[...tabItems] ?? [],
)
const [curTabItems, setCurTabItems] = useState<ReactElement[]>(tabItems)
const firstTabKey = useMemo(() => {
return curTabItems[0]?.key?.toString()
}, [curTabItems])
Expand Down

0 comments on commit f4bd338

Please sign in to comment.