LyteNyte Grid logo for light mode. Links back to the documentation home page.
Infinite Data Loading

Infinite Row Sorting

Provide a sort model to the server data source to infinitely load sorted rows.

Sorting Infinite Rows

To sort rows on the server, define a sort model and include it in each data request. The useServerDataSource hook accepts the sort model as part of the queryKey.

The sort model can take any shape that fits your application’s needs. In most cases, you should match the format that your server or database expects.

The demo below shows infinite row sorting. When you click a column header, the grid updates that column’s sort state.

Sorted Infinite Rows

Fork code on stack blitzFork code on code sandbox

The demo code applies sort state to columns. By extending the grid’s API, you can update the sort property on each column directly. The extended API then applies the appropriate sort when the user clicks a column header.

Next Steps