Skip to content

Commit

Permalink
Update tabs.lite.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
mfranzke authored Jul 9, 2024
1 parent 4f2adcd commit 2e4d4b9
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions packages/components/src/components/tabs/tabs.lite.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,15 +122,12 @@ export default function DBTabs(props: DBTabsProps) {
ref.querySelectorAll('.db-tab-panel')
);
for (const panel of tabPanels) {
(panel: Element, index: number) => {
if (!panel.id) {
panel.id = `${state._name}-tab-panel-${index}`;
panel.setAttribute(
'aria-labelledby',
`${state._name}-tab-${index}`
);
}
};
if (panel.id) continue;
panel.id = `${state._name}-tab-panel-${index}`;
panel.setAttribute(
'aria-labelledby',
`${state._name}-tab-${index}`
);
}
}
}
Expand Down

0 comments on commit 2e4d4b9

Please sign in to comment.