Skip to content

Commit 16f369f

Browse files
author
Alexandr Kozhevnikov
committed
fix close all tabs
1 parent b48157b commit 16f369f

File tree

8 files changed

+475
-254
lines changed

8 files changed

+475
-254
lines changed

package-lock.json

Lines changed: 42 additions & 42 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-tabtab-next",
3-
"version": "3.2.16",
3+
"version": "3.3.0",
44
"description": "A mobile support, draggable, editable and api based Tab for ReactJS",
55
"workspaces": [
66
"./packages/*"
@@ -47,7 +47,8 @@
4747
"homepage": "https://github.com/onmotion/react-tabtab-next#readme",
4848
"dependencies": {
4949
"react": "^16.8.0 || ^17 || ^18",
50-
"react-dom": "^16.8.0 || ^17 || ^18"
50+
"react-dom": "^16.8.0 || ^17 || ^18",
51+
"styled-components": "5.3.3"
5152
},
5253
"devDependencies": {
5354
"@babel/preset-env": "^7.16.11",
@@ -111,4 +112,4 @@
111112
"lint",
112113
"test"
113114
]
114-
}
115+
}

packages/tabtab/dist/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,8 @@ var TabListComponent = /** @class */ (function (_super) {
273273
this.listScroll.style.transform = "translate3d(-".concat(this.scrollPosition, "px, 0, 0)");
274274
};
275275
TabListComponent.prototype.scrollToIndex = function (index, rectSide) {
276+
if (index < 0)
277+
return;
276278
var tabOffset = this.getTabNode(this.tabRefs[index]).getBoundingClientRect();
277279
var containerOffset = this.listContainer.getBoundingClientRect();
278280
// Cancel scrolling if the tab is visible

0 commit comments

Comments
 (0)