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

> The InfiniteScrollOptions interface of @salmonui/data-grid/engine/infinite.

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

```ts
import type { InfiniteScrollOptions } 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: interface

```ts
interface InfiniteScrollOptions<Row = unknown> {
    readonly blockSize?: number;
    readonly initialBlocks?: number;
    readonly cache?: boolean;
    readonly maxBlocks?: number;
    readonly threshold?: number;
    readonly debounceMs?: number;
    readonly initialResult?: Pick<DataSourceResult<Row>, 'rows' | 'totalRowCount' | 'pageInfo'>;
    readonly scheduler?: InfiniteScheduler;
}
```

Members (8):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `blockSize` | `readonly blockSize?: number;` | optional | Rows per block and per request unit. Default 100. |
| `initialBlocks` | `readonly initialBlocks?: number;` | optional | Blocks of the first request. Default 3. |
| `cache` | `readonly cache?: boolean;` | optional | Bound the blocks held in memory to `maxBlocks`. Default false: every loaded block is kept. |
| `maxBlocks` | `readonly maxBlocks?: number;` | optional | Blocks kept with `cache`; never fewer than the viewport needs. Default 3. |
| `threshold` | `readonly threshold?: number;` | optional | Rows before the loaded end (and around the viewport) at which the next block is requested. Default half a block. |
| `debounceMs` | `readonly debounceMs?: number;` | optional | Quiet time before a request for a jump target (scrollbar drag, scrollTo) and between sequential requests. Default 50 ms. |
| `initialResult` | `readonly initialResult?: Pick<DataSourceResult<Row>, 'rows' \| 'totalRowCount' \| 'pageInfo'>;` | optional | The first blocks, already fetched (server render): rendered on the server and on the first client render, and not requested again. `rows` start at row 0. |
| `scheduler` | `readonly scheduler?: InfiniteScheduler;` | optional | Clock and timers (tests). Default `Date.now`, `setTimeout`, `clearTimeout`. |
