mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Small cleaning
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
parent
b3de1791e0
commit
2a568d0fda
@ -24,7 +24,7 @@ export interface DockTabsProps {
|
||||
export const DockTabs = ({ tabs, autoFocus, selectedTab, onChangeTab }: DockTabsProps) => {
|
||||
const elem = useRef<HTMLDivElement>();
|
||||
const minTabSize = useRef<number>(0);
|
||||
const [showScrollbar, setShowScrollbar] = useState<boolean>(false);
|
||||
const [showScrollbar, setShowScrollbar] = useState(false);
|
||||
|
||||
const getTabElements = (): HTMLDivElement[] => {
|
||||
return Array.from(elem.current?.querySelectorAll(".Tabs .Tab"));
|
||||
@ -75,10 +75,6 @@ export const DockTabs = ({ tabs, autoFocus, selectedTab, onChangeTab }: DockTabs
|
||||
minTabSize.current = cssVars.get("--min-tab-width").valueOf();
|
||||
});
|
||||
|
||||
useEffect(() => {
|
||||
updateScrollbarVisibility();
|
||||
}, [tabs]);
|
||||
|
||||
useResizeObserver(elem.current, () => {
|
||||
scrollActiveTabIntoView();
|
||||
updateScrollbarVisibility();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user