Update scrollbar overflow on tabs change

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
Alex Andreev committed 2022-03-14 16:11:44 +03:00
1 parent 09457e9f95
commit 45644fe5ab
1 file changed
+4
@@ -59,6 +59,10 @@ export const DockTabs = ({ tabs, autoFocus, selectedTab, onChangeTab }: DockTabs
minTabSize.current = cssVars.get("--min-tab-width").valueOf();
});
useEffect(() => {
updateScrollbarVisibility();
}, [tabs]);
useResizeObserver(elem.current, updateScrollbarVisibility);
return (