Security News
RubyGems.org Adds New Maintainer Role
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
react-checkbox-tree
Advanced tools
Checkbox treeview for React.
The easiest way to use react-checkbox-tree is to install from NPM and include it in your own React build process (e.g. using Webpack):
npm install react-checkbox-tree --save
A quick usage example is included below. Note that the react-checkbox-tree component is controlled. In other words, it is stateless. You must update its checked
and expanded
properties whenever a change occurs.
import CheckboxTree from 'react-checkbox-tree';
const nodes = [{
value: 'node-1',
title: 'Parent Node 1',
children: [{
value: 'node-1-1',
title: 'Leaf Node 1-1',
}, {
value: 'node-1-2',
title: 'Leaf Node 1-2'
}],
}];
class Widget extends React.Component {
constructor() {
super();
this.state = {
checked: [],
expanded: [],
};
}
render() {
const { checked, expanded } = this.state;
return (
<Tree
name="tree_nodes"
nodes={nodes}
checked={checked}
expanded={expanded}
onCheck={checked => this.setState({ checked }}
onExpand={expanded => this.setState({ expanded }}
/>
);
}
}
Property | Type | Description |
---|---|---|
nodes | array | Required. Specifies the tree nodes and their children. |
checked | array | Required. An array of checked node values. |
expanded | array | Required. An array of expanded node values. |
onCheck | function | Required. onCheck handler: function(checked) {} |
onExpand | function | Required. onExpand handler: function(expanded) {} |
name | string | Optional name for the hidden <input> element. |
nameAsArray | bool | If true, the hidden <input> will encode its values as an array rather than a joined string. |
v0.4.0 (2017-01-27)
optimisticToggle
configuration to toggle child nodes optimistically or pessimisticallyFAQs
A simple and elegant checkbox tree for React.
The npm package react-checkbox-tree receives a total of 53,674 weekly downloads. As such, react-checkbox-tree popularity was classified as popular.
We found that react-checkbox-tree demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.
Security News
Research
Socket's threat research team has detected five malicious npm packages targeting Roblox developers, deploying malware to steal credentials and personal data.