API reference: @salmonui/data-grid/engine/infinite
InfiniteViewclass
import { InfiniteView } from '@salmonui/data-grid/engine/infinite';class InfiniteView<Row = unknown> implements RowModelView {
readonly kind: 'infinite';
readonly count: number;
readonly dataCount: number;
readonly status: InfiniteStatus;
private readonly blocks;
private readonly pending;
private readonly store;
private readonly B;
constructor(store: InfiniteStore<Row>);
private block;
isLoaded(index: number): boolean;
statusAt(index: number): 'loading' | 'error';
kindAt(index: number): RowKind;
sourceIndexAt(): number;
idAt(index: number): RowId | undefined;
depthAt(): number;
indexOfSource(): number;
parentOfSource(): RowId | null;
resolve(id: RowId): ViewRowInfo | undefined;
}
Row model view over the loaded blocks: loaded rows are data, the others loading placeholders.
| Name | Signature | Description |
|---|---|---|
kind | readonly kind: 'infinite'; | |
count | readonly count: number; | |
dataCount | readonly dataCount: number; | |
status | readonly status: InfiniteStatus; | |
blocks | private readonly blocks; | |
pending | private readonly pending; | |
store | private readonly store; | |
B | private readonly B; | |
block | private block; | |
isLoaded | isLoaded(index: number): boolean; | The row at |
statusAt | statusAt(index: number): 'loading' | 'error'; | Placeholder state: |
kindAt | kindAt(index: number): RowKind; | |
sourceIndexAt | sourceIndexAt(): number; | |
idAt | idAt(index: number): RowId | undefined; | |
depthAt | depthAt(): number; | |
indexOfSource | indexOfSource(): number; | |
parentOfSource | parentOfSource(): RowId | null; | |
resolve | resolve(id: RowId): ViewRowInfo | undefined; |