Skip to content

Commit 113dee7

Browse files
authored
fix(playground-tabs): show arrows on long list (#3009)
1 parent dc99a6e commit 113dee7

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/components/global/Playground/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ export default function Playground({
417417
return null;
418418
}
419419
return (
420-
<PlaygroundTabs className="playground__tabs">
420+
<PlaygroundTabs groupId={usageTarget} className="playground__tabs">
421421
{Object.keys(codeSnippets[usageTarget]).map((fileName) => (
422422
<TabItem
423423
className="playground__tab-item"

src/components/global/PlaygroundTabs/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ function TabsComponent(props: Props): JSX.Element {
108108
useEffect(() => {
109109
setLeftNavVisible(tabsNavEl.current?.scrollLeft > 40);
110110
setRightNavVisible(tabsNavEl.current?.scrollWidth > tabsNavEl.current?.offsetWidth);
111-
}, []);
111+
}, [groupId]);
112112

113113
/**
114114
* If the selected value is not in the available tabs, fall back to the first tab.

0 commit comments

Comments
 (0)