View as Markdown

API reference: @salmonui/data-grid/engine/tree

TreeViewModelinterface

import type { TreeViewModel } from '@salmonui/data-grid/engine/tree';
interface TreeViewModel {
    readonly structure: TreeStructure;
    readonly expanded: Uint8Array;
    readonly match: Uint8Array | null;
    readonly lazy: Uint8Array | null;
    readonly ranges: TreeRanges;
    readonly pageBy: 'all' | 'root';
}

The tree view's per-model data (shared by its paged views).

TreeViewModel members (6)
NameSignatureDescription
structurereadonly structure: TreeStructure;
expandedreadonly expanded: Uint8Array;

By source index: 1 when the row is expanded.

matchreadonly match: Uint8Array | null;

By source index: 1 when the row matches the query (null: every kept row matches). Kept rows that do not match are context rows.

lazyreadonly lazy: Uint8Array | null;

By source index: 1 when the row has children that are not loaded (lazy), or null.

rangesreadonly ranges: TreeRanges;
pageByreadonly pageBy: 'all' | 'root';

root: the page stage pages root rows. The unpaged view then reports the root count as dataCount (the page stage's unit); its paged windows report their data rows.