Skip to content

Commit

Permalink
Tabs - Fixed arrow navigation (#15632)
Browse files Browse the repository at this point in the history
* fix: fixed keydown bug

* fix: removed stories
  • Loading branch information
guidari authored Feb 13, 2024
1 parent ffc385b commit 04e231f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/react/src/components/Tabs/Tabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,9 @@ function TabList({
) {
event.preventDefault();

const activeTabs: TabElement[] = tabs.current.filter(
const filtredTabs = tabs.current.filter((tab) => tab !== null);

const activeTabs: TabElement[] = filtredTabs.filter(
(tab) => !tab.disabled
);

Expand All @@ -420,7 +422,6 @@ function TabList({
} else if (activation === 'manual') {
setActiveIndex(nextIndex);
}

tabs.current[nextIndex]?.focus();
}
}
Expand Down

0 comments on commit 04e231f

Please sign in to comment.