diff --git a/src/Tabs.tsx b/src/Tabs.tsx index f39f2ea4..cff81245 100644 --- a/src/Tabs.tsx +++ b/src/Tabs.tsx @@ -128,7 +128,7 @@ function Tabs( }, []); // ====================== Active Key ====================== - const [mergedActiveKey, setMergedActiveKey] = useMergedState(undefined, { + const [mergedActiveKey, setMergedActiveKey] = useMergedState(() => tabs[0]?.key, { value: activeKey, defaultValue: defaultActiveKey, });