Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

rc-tabs

Package Overview
Dependencies
Maintainers
7
Versions
228
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rc-tabs - npm Package Compare versions

Comparing version 12.4.1 to 12.4.2

37

es/TabNavList/index.js

@@ -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": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc