Comparing version 1.1.2 to 1.1.3
@@ -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": [ |
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
62073
1553