• Interface

    Imperative Handle for TreeFold used to manipulate the fold-state from without the TreeFold container.

    Returns MutableRefObject<TreeFoldControls>

    Example

    const App = () => {
    const myTree = useTree();
    const myControls = useFoldControls();

    const openSomeStuff = useCallback(() => {
    myControls.current?.set("someKey", true);
    }, [])

    return <TreeView value={myTree} renderer={MyNodeRenderer} foldControls={controls} />
    }