From 63ba568bc387b5728929269bab74230e8bc92cb9 Mon Sep 17 00:00:00 2001 From: Kenzo Wada <79452224+Kenzo-Wada@users.noreply.github.com> Date: Thu, 7 Nov 2024 19:12:05 +0900 Subject: [PATCH] [@mantine/core] Tabs: Fix `tabIndex` not being overridden by Tabs.Tab props (#7081) --- packages/@mantine/core/src/components/Tabs/TabsTab/TabsTab.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/@mantine/core/src/components/Tabs/TabsTab/TabsTab.tsx b/packages/@mantine/core/src/components/Tabs/TabsTab/TabsTab.tsx index 8a7f30db525..058cbfd2f30 100644 --- a/packages/@mantine/core/src/components/Tabs/TabsTab/TabsTab.tsx +++ b/packages/@mantine/core/src/components/Tabs/TabsTab/TabsTab.tsx @@ -62,6 +62,7 @@ export const TabsTab = factory((_props, ref) => { styles, vars, mod, + tabIndex, ...others } = props; @@ -97,7 +98,7 @@ export const TabsTab = factory((_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 }}