Skip to content

Commit

Permalink
fix: tab component error (#16949)
Browse files Browse the repository at this point in the history
  • Loading branch information
preetibansalui authored Jul 15, 2024
1 parent 5eec54e commit 2720189
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/react/src/components/Tabs/Tabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1216,7 +1216,7 @@ const Tab = forwardRef<HTMLElement, TabProps>(function Tab(

useLayoutEffect(() => {
function handler() {
const elementTabId = document.getElementById(`${id}`);
const elementTabId = document.getElementById(`${id}`) || tabRef.current;
const newElement = elementTabId?.getElementsByClassName(
`${prefix}--tabs__nav-item-label`
)[0];
Expand Down

0 comments on commit 2720189

Please sign in to comment.