An implement of treeview component with react.js
- support ie8+,chrome,firefox,safari
http://localhost:8008/examples/
import Tree from './treeview';
import TreeNode from './treenode';
React.render(
<Tree autoCheckNodes={true}>
<TreeNode text="Movies">
<TreeNode text="The Shawshank Redemption"/>
<TreeNode text="The Godfather" />
<TreeNode text="The Dark Knight" />
</TreeNode>
</Tree>,
document.querySelector('body'));
name | type | default | description |
---|---|---|---|
enableTriState | bool | Enable triple-state of checkboxes | |
autoCheckNodes | bool | whether expand the tree node | |
showCheckboxes | bool | Determines if checkbox shown on node | |
expandState | bool | true | Set default expand state of each node. |
nodeExpanded | function | Fired when node expanded | |
nodeCollapsed | function | Fired when node collapsed | |
nodeChecked | function | Fired when node checked |
react-treeview is released under the MIT license.