Infinite Scroll
Connect a real HTTP backend. The grid fetches the next batch of rows as you scroll down. Each request carries your active sorts and filters, so the results always reflect the current view.
How infinite scroll works
With scrollMode: 'infinite', the grid fetches the first batch on load and listens
for scroll events. When the user approaches the bottom of the loaded content, it fires another
fetchRows() call with the next offset and the same limit.
Rows accumulate — they're appended, never replaced. The process stops when the loaded count reaches
totalCount, at which point the grid shows the messages.allLoaded string.
Key config options
- scrollMode: 'infinite' — activates this mode. The grid renders a fixed-height viewport with an inner virtual scroll container.
- pageSize — the
limitvalue sent in everyfetchRows()call. Tune this to match your API's optimal page size — smaller values mean more round-trips, larger values mean slower initial paint. Default: 50. - filterMode: 'row' — renders a persistent filter input row below the column
headers. A filter change resets the grid and calls
fetchRows()from offset 0. - messages.allLoaded — text shown at the bottom when all rows are loaded.
Customize it to match your data noun:
'All 500 employees loaded'. - messages.empty / messages.error — shown when no rows match or the fetch fails. A Retry button appears with the error state automatically.
What FetchParams contains
On each call, the grid provides offset (rows to skip), limit
(rows to return), sorts: SortConfig[], and filters: FilterState.
Serialize what your API understands and discard the rest. Sort and filter changes always reset
offset to 0 — the grid never pages forward into a different filter state.
Error handling
If fetchRows() returns an error Observable, the grid shows the error state with
a Retry button. The retry call reuses the same offset, so the user doesn't lose their
scroll position. Catch and rethrow in your data source if you need to log or transform the error first.
Choosing between scroll modes
Infinite scroll suits browsing flows where users read top-to-bottom and want seamless continuity. Use paging when users need to navigate to a specific page number.
A failed fetch shows the error state with a Retry button, and the retry reuses the same
offset — the user never loses their scroll position.
Infinite scroll options
| Property | Type | Default | Description |
|---|---|---|---|
| config.scrollMode: 'infinite' | ScrollMode | 'infinite' | Appends the next batch when the user nears the bottom — rows accumulate, never replaced. |
| config.pageSize | number | 50 | The limit sent in every fetchRows() call. |
| config.filterMode: 'row' | 'row' | 'popup' | — | Persistent filter inputs under the headers (popup puts them behind header icons); a change resets to offset 0 and refetches. |
| config.messages.allLoaded | string | 'All records loaded' | Shown at the bottom once the loaded count reaches totalCount. |
| config.messages.empty / error | string | — | Empty and error states — the error state renders a Retry button automatically. |
| params.sorts / params.filters | SortConfig[] / FilterState | — | Serialize what your API understands; sort/filter changes always reset offset to 0. |