Comparing version 12.4.1 to 12.4.2
@@ -282,17 +282,5 @@ import _extends from "@babel/runtime/helpers/esm/extends"; | ||
}); | ||
var onListHolderResize = useRaf(function () { | ||
// Update wrapper records | ||
var containerSize = getSize(containerRef); | ||
var extraLeftSize = getSize(extraLeftRef); | ||
var extraRightSize = getSize(extraRightRef); | ||
setContainerExcludeExtraSize([containerSize[0] - extraLeftSize[0] - extraRightSize[0], containerSize[1] - extraLeftSize[1] - extraRightSize[1]]); | ||
var newAddSize = getSize(innerAddButtonRef); | ||
setAddSize(newAddSize); | ||
var newOperationSize = getSize(operationsRef); | ||
setOperationSize(newOperationSize); | ||
// Which includes add button size | ||
var tabContentFullSize = getSize(tabListRef); | ||
setTabContentSize([tabContentFullSize[0] - newAddSize[0], tabContentFullSize[1] - newAddSize[1]]); | ||
// Update buttons records | ||
setTabSizes(function () { | ||
// Update buttons records | ||
var updateTabSizes = function updateTabSizes() { | ||
return setTabSizes(function () { | ||
var newSizes = new Map(); | ||
@@ -313,2 +301,21 @@ tabs.forEach(function (_ref2) { | ||
}); | ||
}; | ||
useEffect(function () { | ||
updateTabSizes(); | ||
}, [tabs.map(function (tab) { | ||
return tab.key; | ||
}).join('_')]); | ||
var onListHolderResize = useRaf(function () { | ||
// Update wrapper records | ||
var containerSize = getSize(containerRef); | ||
var extraLeftSize = getSize(extraLeftRef); | ||
var extraRightSize = getSize(extraRightRef); | ||
setContainerExcludeExtraSize([containerSize[0] - extraLeftSize[0] - extraRightSize[0], containerSize[1] - extraLeftSize[1] - extraRightSize[1]]); | ||
var newAddSize = getSize(innerAddButtonRef); | ||
setAddSize(newAddSize); | ||
var newOperationSize = getSize(operationsRef); | ||
setOperationSize(newOperationSize); | ||
// Which includes add button size | ||
var tabContentFullSize = getSize(tabListRef); | ||
setTabContentSize([tabContentFullSize[0] - newAddSize[0], tabContentFullSize[1] - newAddSize[1]]); | ||
}); | ||
@@ -315,0 +322,0 @@ // ======================== Dropdown ======================= |
@@ -291,17 +291,5 @@ "use strict"; | ||
}); | ||
var onListHolderResize = (0, _useRaf.default)(function () { | ||
// Update wrapper records | ||
var containerSize = getSize(containerRef); | ||
var extraLeftSize = getSize(extraLeftRef); | ||
var extraRightSize = getSize(extraRightRef); | ||
setContainerExcludeExtraSize([containerSize[0] - extraLeftSize[0] - extraRightSize[0], containerSize[1] - extraLeftSize[1] - extraRightSize[1]]); | ||
var newAddSize = getSize(innerAddButtonRef); | ||
setAddSize(newAddSize); | ||
var newOperationSize = getSize(operationsRef); | ||
setOperationSize(newOperationSize); | ||
// Which includes add button size | ||
var tabContentFullSize = getSize(tabListRef); | ||
setTabContentSize([tabContentFullSize[0] - newAddSize[0], tabContentFullSize[1] - newAddSize[1]]); | ||
// Update buttons records | ||
setTabSizes(function () { | ||
// Update buttons records | ||
var updateTabSizes = function updateTabSizes() { | ||
return setTabSizes(function () { | ||
var newSizes = new Map(); | ||
@@ -322,2 +310,21 @@ tabs.forEach(function (_ref2) { | ||
}); | ||
}; | ||
(0, React.useEffect)(function () { | ||
updateTabSizes(); | ||
}, [tabs.map(function (tab) { | ||
return tab.key; | ||
}).join('_')]); | ||
var onListHolderResize = (0, _useRaf.default)(function () { | ||
// Update wrapper records | ||
var containerSize = getSize(containerRef); | ||
var extraLeftSize = getSize(extraLeftRef); | ||
var extraRightSize = getSize(extraRightRef); | ||
setContainerExcludeExtraSize([containerSize[0] - extraLeftSize[0] - extraRightSize[0], containerSize[1] - extraLeftSize[1] - extraRightSize[1]]); | ||
var newAddSize = getSize(innerAddButtonRef); | ||
setAddSize(newAddSize); | ||
var newOperationSize = getSize(operationsRef); | ||
setOperationSize(newOperationSize); | ||
// Which includes add button size | ||
var tabContentFullSize = getSize(tabListRef); | ||
setTabContentSize([tabContentFullSize[0] - newAddSize[0], tabContentFullSize[1] - newAddSize[1]]); | ||
}); | ||
@@ -324,0 +331,0 @@ // ======================== Dropdown ======================= |
{ | ||
"name": "rc-tabs", | ||
"version": "12.4.1", | ||
"version": "12.4.2", | ||
"description": "tabs ui component for react", | ||
@@ -5,0 +5,0 @@ "engines": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
155684
3713