react-checkbox-tree
Advanced tools
Comparing version 0.0.5 to 0.0.6
{ | ||
"name": "react-checkbox-tree", | ||
"version": "0.0.5", | ||
"version": "0.0.6", | ||
"description": "React component for checkbox trees.", | ||
@@ -18,3 +18,3 @@ "author": "Jake Zatecky", | ||
"babel-core": "^6.4.5", | ||
"babel-eslint": "^4.1.8", | ||
"babel-eslint": "^5.0.0", | ||
"babel-loader": "^6.2.2", | ||
@@ -25,7 +25,7 @@ "babel-preset-es2015": "^6.3.13", | ||
"chai": "^3.5.0", | ||
"eslint": "^1.10.3", | ||
"eslint-config-airbnb": "^4.0.0", | ||
"eslint-plugin-react": "^3.16.1", | ||
"eslint": "^2.2.0", | ||
"eslint-config-airbnb": "^6.0.2", | ||
"eslint-plugin-react": "^4.1.0", | ||
"gulp": "^3.9.0", | ||
"gulp-eslint": "^1.1.1", | ||
"gulp-eslint": "^2.0.0", | ||
"gulp-header": "^1.7.1", | ||
@@ -35,3 +35,3 @@ "gulp-mocha-phantomjs": "^0.11.0", | ||
"gulp-scss-lint": "^0.3.9", | ||
"http-server": "^0.8.5", | ||
"http-server": "^0.9.0", | ||
"mocha": "^2.4.5", | ||
@@ -38,0 +38,0 @@ "react-dom": "^0.14.7", |
@@ -0,0 +0,0 @@ // Use CommonJS export to trick Webpack into working around the issues that |
@@ -11,4 +11,10 @@ import React from 'react'; | ||
checked: React.PropTypes.array, | ||
expanded: React.PropTypes.array, | ||
}; | ||
static defaultProps = { | ||
checked: [], | ||
expanded: [], | ||
}; | ||
constructor(props) { | ||
@@ -19,2 +25,3 @@ super(props); | ||
checked: props.checked, | ||
expanded: props.expanded, | ||
}; | ||
@@ -30,2 +37,3 @@ | ||
formatted.checked = this.state.checked.indexOf(node.value) > -1; | ||
formatted.collapsed = this.state.expanded.indexOf(node.value) === -1; | ||
@@ -53,2 +61,3 @@ if (this.hasChildren(node)) { | ||
checked={checked} | ||
collapsed={node.collapsed} | ||
rawChildren={node.children} | ||
@@ -55,0 +64,0 @@ onCheck={this.handleCheck} |
@@ -11,2 +11,3 @@ import React from 'react'; | ||
checked: React.PropTypes.number, | ||
collapsed: React.PropTypes.bool, | ||
rawChildren: React.PropTypes.any, | ||
@@ -20,3 +21,3 @@ onCheck: React.PropTypes.func, | ||
this.state = { | ||
collapsed: true, | ||
collapsed: props.collapsed, | ||
}; | ||
@@ -23,0 +24,0 @@ |
@@ -0,0 +0,0 @@ /* eslint-disable */ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
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
708191
17955