View as Markdown

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

RemoteTreeinterface

import type { RemoteTree } from '@salmonui/data-grid/engine/tree-remote';
interface RemoteTree<Row> {
    readonly dataSource: DataSource<Row>;
    module(options?: TreeOptions<Row>): TreeModule<Row>;
    getLoadError(rowId: RowId): unknown;
    loadMoreRoots(): Promise<boolean>;
    getRootBlocks(): RemoteTreeRootBlocks;
}
RemoteTree members (5)
NameSignatureDescription
dataSourcereadonly dataSource: DataSource<Row>;

The engine's dataSource (mode: 'remote').

modulemodule(options?: TreeOptions<Row>): TreeModule<Row>;

The tree module to register instead of createTreeModule(options) (call once per engine).

getLoadErrorgetLoadError(rowId: RowId): unknown;

Error of the last failed child load of a row, or undefined.

loadMoreRootsloadMoreRoots(): Promise<boolean>;

rootBlocks: reads the next block of root rows and appends it (one read at a time). Resolves true when rows were appended; false when there is nothing to read, a read is in flight, or a query change superseded it. Rejects when the read fails.

getRootBlocksgetRootBlocks(): RemoteTreeRootBlocks;

rootBlocks state (hasMore is false without rootBlocks).