PresentationTree Function

building APIs (see https://github.com/iTwin/presentation/blob/33e79ee8d77f30580a9bab81a72884bda008db25/README.md#the-packages).

Component that provides a convenient API for using usePresentationTreeState hook with ControlledTree.

Usage example:

function Tree(props) {
  const state = usePresentationTreeState({ imodel: props.imodel, ruleset: TREE_RULESET, pagingSize: PAGING_SIZE });
  if (!state) {
    return null;
  }

  return <PresentationTree state={state} width={200} height={400} selectionMode={SelectionMode.Single} />;
}

PresentationTree<TEventHandler extends TreeEventHandler>(__namedParameters: PresentationTreeProps<TEventHandler>): JSX.Element

Parameter Type Description
__namedParameters PresentationTreeProps<TEventHandler>  

Returns - JSX.Element

Defined in

Last Updated: 17 December, 2024