API reference: @salmonui/data-grid
DataGridInfiniteScrollinterface
import type { DataGridInfiniteScroll } from '@salmonui/data-grid';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.
| Name | Signature | Description |
|---|---|---|
cacheoptional | cache?: boolean; | Keep at most |
initialBlocksoptional | initialBlocks?: number; | Blocks of the first request. Default 3. |
maxBlocksoptional | maxBlocks?: number; | Blocks kept with |
blockSizeoptional | blockSize?: number; | Rows per block and per request unit. Default 100. |
thresholdoptional | threshold?: number; | Rows before the loaded end, and around the viewport, at which a block is requested. Default half a block. |
debounceoptional | debounce?: number; | Quiet time (ms) before requesting a jump target (scrollbar drag) and between sequential requests. Default 50. |
initialResultoptional | initialResult?: {
readonly rows: readonly Row[];
readonly totalRowCount?: number;
readonly hasNextPage?: boolean;
}; | 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. |