linear-react-components-ui 0.4.76-beta.7 → 0.4.76-beta.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/tabs/index.js +3 -1
- package/package.json +1 -1
package/lib/tabs/index.js
CHANGED
|
@@ -146,6 +146,8 @@ var Tabs = function Tabs(props) {
|
|
|
146
146
|
});
|
|
147
147
|
}
|
|
148
148
|
|
|
149
|
+
console.log(tabsListWidth, tabsContentWidth);
|
|
150
|
+
|
|
149
151
|
if (tabsListWidth > tabsContentWidth) {
|
|
150
152
|
var lastPanel = currentTabs[currentTabs.length - 1];
|
|
151
153
|
dropdownTabs.push(lastPanel);
|
|
@@ -256,7 +258,7 @@ var Tabs = function Tabs(props) {
|
|
|
256
258
|
}, [selectedTab, children]);
|
|
257
259
|
(0, _react.useEffect)(function () {
|
|
258
260
|
getTabsList();
|
|
259
|
-
}, [panels.length, currentPanels.length]);
|
|
261
|
+
}, [panels.length, currentPanels.length, tabsContentWidth]);
|
|
260
262
|
(0, _react.useEffect)(function () {
|
|
261
263
|
var currentDropdownWidth = dropdownPanels.length > 0 ? _menuRef.current.children[1].clientWidth : 0;
|
|
262
264
|
setDropdownWidth(currentDropdownWidth);
|