1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
Alex Andreev 2022-03-21 10:51:12 +03:00
parent 734f03c84e
commit 8a12500d26
2 changed files with 3 additions and 3 deletions

View File

@ -56,9 +56,9 @@ export const DockTabs = ({ tabs, autoFocus, selectedTab, onChangeTab }: DockTabs
}; };
const updateScrollbarVisibility = () => { const updateScrollbarVisibility = () => {
const allTabsShrinked = getTabElements().every(tab => tab.offsetWidth == minTabSize.current); const allTabsShrunk = getTabElements().every(tab => tab.offsetWidth == minTabSize.current);
setShowScrollbar(allTabsShrinked); setShowScrollbar(allTabsShrunk);
}; };
const scrollTabsWithMouseWheel = (left: number) => { const scrollTabsWithMouseWheel = (left: number) => {

View File

@ -93,7 +93,7 @@ class NonInjectedDock extends React.Component<DockProps & Dependencies> {
const nextIndex = currentIndex + direction; const nextIndex = currentIndex + direction;
// check if moving to the next or previous tab is possible. // check if moving to the next or previous tab is possible.
if (currentIndex!== -1 && (nextIndex >= tabs.length || nextIndex < 0)) return; if (nextIndex >= tabs.length || nextIndex < 0) return;
const nextElement = tabs[nextIndex]; const nextElement = tabs[nextIndex];