MCPcopy Index your code
hub / github.com/adobe/react-spectrum / useTree

Function useTree

packages/react-aria/src/tree/useTree.ts:50–61  ·  view source on GitHub ↗
(
  props: AriaTreeOptions<T>,
  state: TreeState<T>,
  ref: RefObject<HTMLElement | null>
)

Source from the content-addressed store, hash-verified

48 * @param ref - The ref attached to the treegrid element.
49 */
50export function useTree<T>(
51 props: AriaTreeOptions<T>,
52 state: TreeState<T>,
53 ref: RefObject<HTMLElement | null>
54): TreeAria {
55 let {gridProps} = useGridList(props, state, ref);
56 gridProps.role = 'treegrid';
57
58 return {
59 gridProps
60 };
61}

Callers 1

TreeInnerFunction · 0.90

Calls 1

useGridListFunction · 0.90

Tested by

no test coverage detected