rsuite-check-tree
Advanced tools
Comparing version 0.2.2-beta.3 to 0.2.2-beta.4
@@ -232,3 +232,2 @@ 'use strict'; | ||
_this.nodes = {}; | ||
_this.tempNode = null; | ||
_this.isControlled = 'value' in props; | ||
@@ -289,14 +288,2 @@ var nextValue = props.value || props.defaultValue || []; | ||
}, { | ||
key: 'getCheckState', | ||
value: function getCheckState(checkedNodes, node) { | ||
var childrenKey = this.props.childrenKey; | ||
if (checkedNodes.length === node[childrenKey].length) { | ||
return 'checked'; | ||
} else if (checkedNodes.length > 0) { | ||
return 'halfChecked'; | ||
} | ||
return 'unchecked'; | ||
} | ||
}, { | ||
key: 'getExpandState', | ||
@@ -454,2 +441,3 @@ value: function getExpandState(node) { | ||
}); | ||
console.log(this.nodes); | ||
} | ||
@@ -461,10 +449,17 @@ }, { | ||
var valueKey = this.props.valueKey; | ||
var _props4 = this.props, | ||
valueKey = _props4.valueKey, | ||
cascade = _props4.cascade; | ||
var selectKey = ''; | ||
// Reset values to false | ||
Object.keys(this.nodes).forEach(function (refKey) { | ||
Object.keys(lists).forEach(function (listKey) { | ||
_this6.nodes[refKey][listKey] = false; | ||
if (selectKey && cascade && refKey.indexOf(selectKey) >= 0) { | ||
_this6.nodes[refKey][listKey] = true; | ||
} | ||
lists[listKey].forEach(function (value) { | ||
if ((0, _isEqual2.default)(_this6.nodes[refKey][valueKey], value)) { | ||
selectKey = refKey; | ||
_this6.nodes[refKey][listKey] = true; | ||
@@ -475,2 +470,4 @@ } | ||
}); | ||
console.log(this.nodes); | ||
} | ||
@@ -594,10 +591,10 @@ }, { | ||
var _props4 = this.props, | ||
defaultExpandAll = _props4.defaultExpandAll, | ||
valueKey = _props4.valueKey, | ||
labelKey = _props4.labelKey, | ||
childrenKey = _props4.childrenKey, | ||
renderTreeNode = _props4.renderTreeNode, | ||
renderTreeIcon = _props4.renderTreeIcon, | ||
cascade = _props4.cascade; | ||
var _props5 = this.props, | ||
defaultExpandAll = _props5.defaultExpandAll, | ||
valueKey = _props5.valueKey, | ||
labelKey = _props5.labelKey, | ||
childrenKey = _props5.childrenKey, | ||
renderTreeNode = _props5.renderTreeNode, | ||
renderTreeIcon = _props5.renderTreeIcon, | ||
cascade = _props5.cascade; | ||
@@ -667,7 +664,7 @@ | ||
var layer = 0; | ||
var _props5 = this.props, | ||
_props5$data = _props5.data, | ||
data = _props5$data === undefined ? [] : _props5$data, | ||
className = _props5.className, | ||
height = _props5.height; | ||
var _props6 = this.props, | ||
_props6$data = _props6.data, | ||
data = _props6$data === undefined ? [] : _props6$data, | ||
className = _props6.className, | ||
height = _props6.height; | ||
@@ -674,0 +671,0 @@ var classes = (0, _classnames2.default)('tree-view', className, { |
{ | ||
"name": "rsuite-check-tree", | ||
"version": "0.2.2-beta.3", | ||
"version": "0.2.2-beta.4", | ||
"description": "A react check tree component", | ||
@@ -5,0 +5,0 @@ "scripts": { |
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
39807
807