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 0.15.4 to 0.16.0

20

lib/Tree.js

@@ -53,6 +53,12 @@ 'use strict';

});
this.defaultExpandAll = props.defaultExpandAll;
var expandedKeys = props.defaultExpandedKeys;
var checkedKeys = props.defaultCheckedKeys;
this.defaultExpandAll = props.defaultExpandAll;
if ('checkedKeys' in props) {
checkedKeys = props.checkedKeys || [];
}
var selectedKeys = props.multiple ? [].concat(_toConsumableArray(props.defaultSelectedKeys)) : [props.defaultSelectedKeys[0]];
if ('selectedKeys' in props) {
selectedKeys = props.multiple ? [].concat(_toConsumableArray(props.selectedKeys)) : [props.selectedKeys[0]];
}
this.state = {

@@ -66,2 +72,14 @@ expandedKeys: expandedKeys,

_createClass(Tree, [{
key: 'componentWillReceiveProps',
value: function componentWillReceiveProps(nextProps) {
var props = {};
if ('checkedKeys' in nextProps) {
props.checkedKeys = nextProps.checkedKeys;
}
if ('selectedKeys' in nextProps) {
props.selectedKeys = nextProps.selectedKeys;
}
this.setState(props);
}
}, {
key: 'getCheckKeys',

@@ -68,0 +86,0 @@ value: function getCheckKeys() {

2

package.json
{
"name": "rc-tree",
"version": "0.15.4",
"version": "0.16.0",
"description": "tree ui component for react",

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

@@ -77,3 +77,5 @@ # rc-tree

|defaultExpandedKeys | expand specific treeNodes | String[] | false |
|checkedKeys | checked treeNodes | String[] | [] |
|defaultCheckedKeys | default checked treeNodes | String[] | [] |
|selectedKeys | selected treeNodes | String[] | [] |
|defaultSelectedKeys | default selected treeNodes | String[] | [] |

@@ -80,0 +82,0 @@ |onCheck | click the treeNode/checkbox to fire | function(e:{checked:bool,node,checkedKeys,event}) | - |

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