# DataGridInfiniteScroll (@salmonui/data-grid)

> The DataGridInfiniteScroll interface of @salmonui/data-grid: infiniteScroll settings.

Canonical: https://salmonui.dev/docs/reference/data-grid/DataGridInfiniteScroll

```ts
import type { DataGridInfiniteScroll } from '@salmonui/data-grid';
```

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

## Reference

Kind: interface

```ts
interface DataGridInfiniteScroll<Row = unknown> {
    cache?: boolean;
    initialBlocks?: number;
    maxBlocks?: number;
    blockSize?: number;
    threshold?: number;
    debounce?: number;
    initialResult?: {
        readonly rows: readonly Row[];
        readonly totalRowCount?: number;
        readonly hasNextPage?: boolean;
    };
}
```

`infiniteScroll` settings.

Members (7):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `cache` | `cache?: boolean;` | optional | Keep at most `maxBlocks` blocks of rows in memory. Default false: every loaded block is kept. |
| `initialBlocks` | `initialBlocks?: number;` | optional | Blocks of the first request. Default 3. |
| `maxBlocks` | `maxBlocks?: number;` | optional | Blocks kept with `cache`; never fewer than the viewport needs. Default 3. |
| `blockSize` | `blockSize?: number;` | optional | Rows per block and per request unit. Default 100. |
| `threshold` | `threshold?: number;` | optional | Rows before the loaded end, and around the viewport, at which a block is requested. Default half a block. |
| `debounce` | `debounce?: number;` | optional | Quiet time (ms) before requesting a jump target (scrollbar drag) and between sequential requests. Default 50. |
| `initialResult` | `initialResult?: {     readonly rows: readonly Row[];     readonly totalRowCount?: number;     readonly hasNextPage?: boolean; };` | optional | The first blocks, fetched by the app (for example in a server component): rendered on the server and on the first client render, and not requested again. Rows start at row 0. |
