This package has been deprecated

Author message:

replaced in favor of nested-sortable-dnd

cy-react-tree

0.1.0 • Public • Published

react-ui-tree Build Status

React tree component

This is a fork of react-ui-tree by Wang Zuo. This project was initially developed for a webpage builder. It maintains an internal tree structure within the component through js-tree.

Demo

https://cvpcasada.github.io/react-ui-tree

Installation

npm install cy-react-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"
    }]
  }]
}

Development

License

MIT

Package Sidebar

Install

npm i cy-react-tree

Weekly Downloads

0

Version

0.1.0

License

MIT

Last publish

Collaborators

  • cvpcasada