1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Update scrollbar overflow on tabs change

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
Alex Andreev 2022-03-14 16:11:44 +03:00
parent 09457e9f95
commit 45644fe5ab

View File

@ -59,6 +59,10 @@ export const DockTabs = ({ tabs, autoFocus, selectedTab, onChangeTab }: DockTabs
minTabSize.current = cssVars.get("--min-tab-width").valueOf(); minTabSize.current = cssVars.get("--min-tab-width").valueOf();
}); });
useEffect(() => {
updateScrollbarVisibility();
}, [tabs]);
useResizeObserver(elem.current, updateScrollbarVisibility); useResizeObserver(elem.current, updateScrollbarVisibility);
return ( return (