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

    Type Alias TreeNode<T>

    One node handed to zag's tree collection; only nodes on an open path are ever built. A group header (disposition: 'group') is a row but never a collection node: its children are spliced into its parent's.

    type TreeNode<T extends { id: string } = any> = {
        branch: boolean;
        children?: TreeNode<T>[];
        childrenCount?: number;
        current: boolean;
        depth: number;
        disabled: boolean;
        empty: boolean;
        group: boolean;
        id: string;
        indexPath: number[];
        item?: T;
        last: boolean;
        open: boolean;
        path: string[];
        props: TreeItemDataProps;
        value: string;
    }

    Type Parameters

    • T extends { id: string } = any
    Index

    Properties

    branch: boolean
    children?: TreeNode<T>[]

    Built only while the branch is open; a closed branch is marked by childrenCount alone.

    childrenCount?: number

    Makes zag's isBranchNode true for a closed branch whose children were never read.

    current: boolean
    depth: number

    1-based depth, which is what zag reports as aria-level.

    disabled: boolean

    Read by zag's getNodeState from the node itself (it ignores isNodeDisabled there).

    empty: boolean

    An open branch with no children: its caret stays (to close it) but reads as empty.

    group: boolean

    A section header (disposition: 'group'): rendered as a row, skipped by the keyboard, never selected.

    id: string
    indexPath: number[]
    item?: T

    Absent only on the synthetic root, which zag needs but never renders.

    last: boolean

    Last of its parent's children in the collection, which offers the drop hitbox's reparent zones.

    open: boolean
    path: string[]
    value: string

    Machine value: the joined path, so the same item at two paths keeps independent state.