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

rc-tree

Package Overview
Dependencies
Maintainers
2
Versions
308
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rc-tree - npm Package Compare versions

Comparing version 1.1.2 to 1.1.3

3

lib/Tree.js

@@ -235,3 +235,4 @@ 'use strict';

checked: checked,
checkedNodes: checkKeys.checkedNodes
checkedNodes: checkKeys.checkedNodes,
checkedNodesPositions: checkKeys.checkedNodesPositions
};

@@ -238,0 +239,0 @@ checkedKeys = checkKeys.checkedKeys;

@@ -202,3 +202,3 @@ 'use strict';

var checkedNodes = [];
var checkedNodesKeys = [];
var checkedNodesPositions = [];
Object.keys(treeNodesStates).forEach(function (item) {

@@ -209,3 +209,3 @@ var itemObj = treeNodesStates[item];

checkedNodes.push(itemObj.node);
checkedNodesKeys.push({ key: itemObj.key, node: itemObj.node, pos: item });
checkedNodesPositions.push({ node: itemObj.node, pos: item });
} else if (itemObj.checkPart) {

@@ -216,3 +216,3 @@ checkPartKeys.push(itemObj.key);

return {
checkPartKeys: checkPartKeys, checkedKeys: checkedKeys, checkedNodes: checkedNodes, checkedNodesKeys: checkedNodesKeys, treeNodesStates: treeNodesStates
checkPartKeys: checkPartKeys, checkedKeys: checkedKeys, checkedNodes: checkedNodes, checkedNodesPositions: checkedNodesPositions, treeNodesStates: treeNodesStates
};

@@ -224,5 +224,5 @@ }

var treeNodesStates = {};
loopAllChildren(children, function (item, index, pos, newKey, siblingPosition) {
loopAllChildren(children, function (item, index, pos, keyOrPos, siblingPosition) {
var checked = false;
if (checkedKeys.indexOf(newKey) !== -1) {
if (checkedKeys.indexOf(keyOrPos) !== -1) {
checked = true;

@@ -233,3 +233,3 @@ checkedPosition.push(pos);

node: item,
key: newKey,
key: keyOrPos,
checked: checked,

@@ -236,0 +236,0 @@ checkPart: false,

{
"name": "rc-tree",
"version": "1.1.2",
"version": "1.1.3",
"description": "tree ui component for react",

@@ -5,0 +5,0 @@ "keywords": [

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