Compositions
DataGridPagination
Pagination footer for a DataGrid: a rows-per-page select, a range summary, and page navigation. Reads pagination state from the surrounding DataGrid context, so it must be rendered inside a DataGrid provider whose table has a pagination row model.
Usage
Best practices
Render inside a
DataGridwhosetablehaspaginatedRowModel: createPaginatedRowModel()wired - it readstable.state.paginationfrom context and throws outside the provider.For server-side paging, drive the table with
manualPagination+pageCountand a controlledpaginationstate; the range summary usesrecordCount, so pass the true total, not the page length.Configure page-size choices via
sizes(not by restyling the select), and localise the range text through theinfotemplate.
Props
Also exports
- interface
DataGridPaginationProps