react-ui-tree-applivi

4.1.3 • Public • Published

react-ui-tree-applivi

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.

React-ui-tree

react-ui-tree

Installation

npm install react-ui-tree-applivi --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-applivi",
  "children": [{
    "collapsed": true,
    "module": "dist",
    "children": [{
      "module": "node.js"
    }]
  }]
}

check app.js for a working example

Development

License

MIT

/react-ui-tree-applivi/

    Package Sidebar

    Install

    npm i react-ui-tree-applivi

    Weekly Downloads

    10

    Version

    4.1.3

    License

    MIT

    Unpacked Size

    26.2 kB

    Total Files

    9

    Last publish

    Collaborators

    • applividevops