interface TreeViewProps<T> {
    foldControls?: RefObject<TreeFoldControls>;
    onFold?: OnFoldHandler;
    renderer: TreeNodeComponent<T>;
    startClosed?: boolean;
    value: MutableRefObject<T>;
}

Type Parameters

  • T extends Tree<any>

    the type of tree that the component prop will be rendering

Properties

foldControls?: RefObject<TreeFoldControls>

pass the return value of useFoldControls into this prop to allow external control of a tree's fold state

onFold?: OnFoldHandler

a callback that is fired when one or more nodes is fired

renderer: TreeNodeComponent<T>

the component that will be used to render the tree's nodes.

startClosed?: boolean

used to indicate what the default fold state is for nodes.

value: MutableRefObject<T>

a RefObject of the tree that will be rendered.