Interface
const App = () => {
const myTree = useTree();
const myControls = useFoldControls();
const openSomeStuff = useCallback(() => {
myControls.current?.set("someKey", true);
}, [])
return <TreeView value={myTree} renderer={MyNodeRenderer} foldControls={controls} />
}
Imperative Handle for TreeFold used to manipulate the fold-state from without the TreeFold container.