Skip to content

TroyAlford/react-editable-treeview

Repository files navigation

react-editable-treeview

React TreeView component with editable nodes

Basic Usage

import * as React from 'react'
import TreeView from 'react-editable-treeview'

const nodes = [{
  text: 'Home',
  children: [{
    text: 'About Us',
    url: '/about-us',
  }, {
    text: 'Contact',
    url: '/contact',
  }],
}]

class MyComponent extends React.Component {
  render() {
    return <TreeView nodes={nodes} />
  }
}

By default, the above code will render the above into nested Unordered List <UL> and List Item <LI> tags and render the child links as Anchor <A> tags with the appropriate urls.

About

React TreeView component with editable nodes

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published