API reference: @salmonui/data-grid/engine/infinite
InfiniteScrollOptionsinterface
import type { InfiniteScrollOptions } from '@salmonui/data-grid/engine/infinite';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;
}
| Name | Signature | Description |
|---|---|---|
blockSizeoptional | readonly blockSize?: number; | Rows per block and per request unit. Default 100. |
initialBlocksoptional | readonly initialBlocks?: number; | Blocks of the first request. Default 3. |
cacheoptional | readonly cache?: boolean; | Bound the blocks held in memory to |
maxBlocksoptional | readonly maxBlocks?: number; | Blocks kept with |
thresholdoptional | readonly threshold?: number; | Rows before the loaded end (and around the viewport) at which the next block is requested. Default half a block. |
debounceMsoptional | readonly debounceMs?: number; | Quiet time before a request for a jump target (scrollbar drag, scrollTo) and between sequential requests. Default 50 ms. |
initialResultoptional | readonly initialResult?: Pick<DataSourceResult<Row>, 'rows' | 'totalRowCount' | 'pageInfo'>; | The first blocks, already fetched (server render): rendered on
the server and on the first client render, and not requested again.
|
scheduleroptional | readonly scheduler?: InfiniteScheduler; | Clock and timers (tests). Default |