# InfiniteStore (@salmonui/data-grid/engine/infinite)

> The InfiniteStore class of @salmonui/data-grid/engine/infinite: Loaded blocks of the current query. blocks and pending are replaced on every change (a view keeps the maps it was built from); index maps the ids of loaded rows to their row index and is checked against the blocks.

Canonical: https://salmonui.dev/docs/reference/data-grid/engine-infinite/InfiniteStore

```ts
import { InfiniteStore } from '@salmonui/data-grid/engine/infinite';
```

Entry index: https://salmonui.dev/docs/reference/data-grid/engine-infinite (Markdown with every symbol of the entry: https://salmonui.dev/docs/reference/data-grid/engine-infinite.md).

## Reference

Kind: class

```ts
class InfiniteStore<Row> {
    readonly options: ResolvedInfiniteOptions;
    blocks: ReadonlyMap<number, InfiniteBlock<Row>>;
    pending: ReadonlySet<number>;
    readonly index: Map<string, number>;
    total: number | null;
    totalKnown: boolean;
    hasMore: boolean;
    highest: number;
    active: boolean;
    seeded: boolean;
    status: InfiniteStatus;
    error: unknown;
    version: number;
    generation: number;
    loadedRows: number;
    stats: {
        requests: number;
        aborted: number;
        evicted: number;
    };
    constructor(options: ResolvedInfiniteOptions);
    count(): number;
    clear(): void;
    place(offset: number, rows: readonly Row[], getRowId: (row: Row, index: number) => RowId, info: PlaceInfo): void;
    drop(next: Map<number, InfiniteBlock<Row>>, b: number): void;
    setBlocks(next: ReadonlyMap<number, InfiniteBlock<Row>>): void;
    rowAt(index: number): Row | undefined;
}
```

Loaded blocks of the current query. `blocks` and `pending` are replaced on
every change (a view keeps the maps it was built from); `index` maps the
ids of loaded rows to their row index and is checked against the blocks.

Members (22):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `options` | `readonly options: ResolvedInfiniteOptions;` |  |  |
| `blocks` | `blocks: ReadonlyMap<number, InfiniteBlock<Row>>;` |  |  |
| `pending` | `pending: ReadonlySet<number>;` |  |  |
| `index` | `readonly index: Map<string, number>;` |  |  |
| `total` | `total: number \| null;` |  |  |
| `totalKnown` | `totalKnown: boolean;` |  | `total` came from the source (`totalRowCount`), not from reaching the end of an unknown total. |
| `hasMore` | `hasMore: boolean;` |  |  |
| `highest` | `highest: number;` |  | End of the highest loaded block. |
| `active` | `active: boolean;` |  |  |
| `seeded` | `seeded: boolean;` |  | Blocks came from `initialResult`; the first query keeps them. |
| `status` | `status: InfiniteStatus;` |  |  |
| `error` | `error: unknown;` |  |  |
| `version` | `version: number;` |  |  |
| `generation` | `generation: number;` |  |  |
| `loadedRows` | `loadedRows: number;` |  |  |
| `stats` | `stats: {     requests: number;     aborted: number;     evicted: number; };` |  |  |
| `count` | `count(): number;` |  | Rows of the view: the exact total, else the loaded end plus one loading row while more may follow. |
| `clear` | `clear(): void;` |  |  |
| `place` | `place(offset: number, rows: readonly Row[], getRowId: (row: Row, index: number) => RowId, info: PlaceInfo): void;` |  | Places result rows starting at row `offset`; complete blocks only (the last block of the data may be short). |
| `drop` | `drop(next: Map<number, InfiniteBlock<Row>>, b: number): void;` |  | Removes a block (eviction, refresh). |
| `setBlocks` | `setBlocks(next: ReadonlyMap<number, InfiniteBlock<Row>>): void;` |  |  |
| `rowAt` | `rowAt(index: number): Row \| undefined;` |  | Loaded row at a row index, or undefined. |
