View as Markdown

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

InfiniteScrollStateinterface

import type { InfiniteScrollState } from '@salmonui/data-grid/engine/infinite';
interface InfiniteScrollState {
    readonly active: boolean;
    readonly version: number;
    readonly generation: number;
    readonly status: InfiniteStatus;
    readonly error: unknown;
    readonly totalRowCount: number | null;
    readonly loadedRowCount: number;
    readonly hasMore: boolean;
}

The infiniteScroll module slice (snapshot.modules.infiniteScroll); replaced once per settled load.

InfiniteScrollState members (8)
NameSignatureDescription
activereadonly active: boolean;

The module serves the main read (remote source, no grouping).

versionreadonly version: number;

Bumped whenever the loaded blocks change.

generationreadonly generation: number;

Bumped when the blocks are dropped for a new query (the renderer scrolls back to the top).

statusreadonly status: InfiniteStatus;
errorreadonly error: unknown;
totalRowCountreadonly totalRowCount: number | null;

Exact row count: the source total, or the loaded end once the last block arrived; null while unknown.

loadedRowCountreadonly loadedRowCount: number;

Rows held in memory.

hasMorereadonly hasMore: boolean;

Unknown total only: more rows may follow the loaded end (a loading row is shown there).