Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
Alex Andreev committed 2022-03-21 10:51:12 +03:00
1 parent 734f03c84e
commit 8a12500d26
2 files changed
+3 -3

No files matched your search

+2 -2
View File
@@ -56,9 +56,9 @@ export const DockTabs = ({ tabs, autoFocus, selectedTab, onChangeTab }: DockTabs
};
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) => {
+1 -1
View File
@@ -93,7 +93,7 @@ class NonInjectedDock extends React.Component<DockProps & Dependencies> {
const nextIndex = currentIndex + direction;
// 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];