View as Markdown

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

RemoteTreeOptionsinterface

import type { RemoteTreeOptions } from '@salmonui/data-grid/engine/tree-remote';
interface RemoteTreeOptions<Row> {
    readonly getRowId: (row: Row, index: number) => RowId;
    readonly onError?: (event: RemoteTreeError) => void;
    readonly rootBlocks?: {
        readonly blockSize?: number;
        readonly initialBlocks?: number;
    };
}
RemoteTreeOptions members (3)
NameSignatureDescription
getRowIdreadonly getRowId: (row: Row, index: number) => RowId;

The grid's getRowId.

onErroroptionalreadonly onError?: (event: RemoteTreeError) => void;

Called once per failed child load (not for aborted loads).

rootBlocksoptionalreadonly rootBlocks?: { readonly blockSize?: number; readonly initialBlocks?: number; };

Infinite scroll in tree mode: read the root rows in blocks of blockSize (default 100; range over the root level), initialBlocks (default 3) on the first read, the next block on loadMoreRoots(). Ignored while the query pages (pageBy: 'root' paging).