@dxos/react-ui-list
    Preparing search index...

    Interface TreeModel<T>

    interface TreeModel<T extends { id: string } = any> {
        childIds: (parentId?: string) => Atom<string[]>;
        item: (id: string) => Atom<undefined | T>;
        itemCurrent: (path: string[]) => Atom<boolean>;
        itemOpen: (path: string[]) => Atom<boolean>;
        itemProps: (path: string[]) => Atom<TreeItemDataProps>;
    }

    Type Parameters

    • T extends { id: string } = any

    Hierarchy (View Summary)

    Index

    Properties

    childIds: (parentId?: string) => Atom<string[]>

    Atom family: outbound child IDs for a parent ID (topology). Undefined = root.

    item: (id: string) => Atom<undefined | T>

    Atom family: resolve item by ID (content).

    itemCurrent: (path: string[]) => Atom<boolean>

    Atom family: current (selected) state keyed by path.

    itemOpen: (path: string[]) => Atom<boolean>

    Atom family: open state keyed by path.

    itemProps: (path: string[]) => Atom<TreeItemDataProps>

    Atom family: display props for an item at a given path (path includes item's own ID at end).