0.0.1 • Published 3 years ago

handle-rc-tree v0.0.1

Weekly downloads
3
License
MIT
Repository
github
Last release
3 years ago

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

namedescriptiontype
dataset tree datafunction(data): void
insertinsert nodefunction(node, callback): void
removeremove nodefunction(callback): void
updateupdate nodefunction(node, callback): void
movemove nodefunction(nodeCallback, parentCallback): void