Skip to content

Commit

Permalink
[@mantine/core] Tabs: Fix tabIndex not being overridden by Tabs.Tab…
Browse files Browse the repository at this point in the history
… props (#7081)
  • Loading branch information
Kenzo-Wada authored Nov 7, 2024
1 parent 07fd832 commit 63ba568
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ export const TabsTab = factory<TabsTabFactory>((_props, ref) => {
styles,
vars,
mod,
tabIndex,
...others
} = props;

Expand Down Expand Up @@ -97,7 +98,7 @@ export const TabsTab = factory<TabsTabFactory>((_props, ref) => {
role="tab"
id={ctx.getTabId(value)}
aria-selected={active}
tabIndex={active || ctx.value === null ? 0 : -1}
tabIndex={tabIndex || active || ctx.value === null ? 0 : -1}
aria-controls={ctx.getPanelId(value)}
onClick={activateTab}
__vars={{ '--tabs-color': color ? getThemeColor(color, theme) : undefined }}
Expand Down

0 comments on commit 63ba568

Please sign in to comment.