Skip to content

Commit aa15c83

Browse files
committed
fix(headless/tabs): type issues
1 parent a609823 commit aa15c83

File tree

1 file changed

+3
-1
lines changed
  • packages/kit-headless/src/components/tabs

1 file changed

+3
-1
lines changed

packages/kit-headless/src/components/tabs/tabs.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,9 @@ export const TabsImpl = component$((props: TabsProps & { tabs: TabInfo[] }) => {
356356
}
357357

358358
function focusOnTab(index: number) {
359-
tabsRootElement?.children[0]?.children[index]?.focus();
359+
const tabListElement = tabsRootElement?.children[0];
360+
const tabToFocusOn = tabListElement?.children[index] as HTMLElement;
361+
tabToFocusOn.focus();
360362
}
361363
});
362364

0 commit comments

Comments
 (0)