npm.io
0.0.1 • Published 5 years ago

handle-rc-tree

Licence
MIT
Version
0.0.1
Deps
1
Size
54 kB
Vulns
2
Weekly
0
Stars
1

handle-rc-tree

use rc-tree more simply

Feature

There is no need to maintain a complex tree data structure externally, and you can easily use the API to update the tree.

Example

run yarn & yarn storybook: http://localhost:6006/

Install

Usage

import Tree from 'handle-rc-tree';

const App = () => {
  const treeRef = Tree.useTree();
  return <Tree ref={treeRef} />;
};

API

name description type
data set tree data function(data): void
insert insert node function(node, callback): void
remove remove node function(callback): void
update update node function(node, callback): void
move move node function(nodeCallback, parentCallback): void

Keywords