5.0.5 • Published 9 months ago

@aer0spike/react-ui-tree v5.0.5

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

react-ui-tree

Build Status npm npm

React tree component

This project was initially developed for a webpage builder. It maintains an internal tree structure within the component through js-tree.

Demo

swiftcarrot.github.io/react-ui-tree/

Installation

npm install react-ui-tree --save

Usage

<Tree
  paddingLeft={20}              // left padding for children nodes in pixels
  tree={this.state.tree}        // tree object
  onChange={this.handleChange}  // onChange(tree) tree object changed
  renderNode={this.renderNode}  // renderNode(node) return react element
/>

// a sample tree object
// node.children, node.collapsed, node.leaf properties are hardcoded
{
  "module": "react-ui-tree",
  "children": [{
    "collapsed": true,
    "module": "dist",
    "children": [{
      "module": "node.js"
    }]
  }]
}

check app.js for a working example

Development

License

MIT

5.0.5

9 months ago

5.0.4

9 months ago

5.0.3

9 months ago

5.0.2

9 months ago

5.0.1

9 months ago

5.0.0

9 months ago