Skip to content

Commit bec4d13

Browse files
committed
update
1 parent 56b8784 commit bec4d13

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/components/Tabs/Tabs.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,9 @@ export function Tabs({ sharedStore, ...slots }: Props) {
6868
<div role="tablist" onKeyDown={moveFocus}>
6969
{tabs.map(([key, content]) => (
7070
<button
71-
ref={(el) => (tabButtonRefs.current[key] = el)}
71+
ref={(el) => {
72+
tabButtonRefs.current[key] = el
73+
}}
7274
onClick={() => {
7375
setCurrStore(getBaseKeyFromTab(key))
7476
}}

src/components/Tabs/TabsContent.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,9 @@ export function TabsContent({ sharedStore, ...slots }: Props) {
6767
<div role="tablist" onKeyDown={moveFocus}>
6868
{tabs.map(([key, content]) => (
6969
<button
70-
ref={(el) => (tabButtonRefs.current[key] = el)}
70+
ref={(el) => {
71+
tabButtonRefs.current[key] = el
72+
}}
7173
onClick={() => {
7274
setCurrStore(getBaseKeyFromTab(key))
7375
}}

0 commit comments

Comments
 (0)