Skip to content

Pagination

Rows are paged, ten to a page, with a pager under the table. Change the numbers, start on a page, or turn paging off and let virtualisation handle the scroll.

#
51Sofia NairChurnedFree$0.00Sep 9, 2026
52Sofia NguyenChurnedTeam$0.00May 13, 2026
53Yuki DuboisActiveTeam$174.00Jun 7, 2024
54Sofia DuboisActiveTeam$1,363.00Sep 17, 2023
55Omar BoseActivePro$36.00Jun 13, 2023
56Sofia DuboisPausedFree$0.00Dec 21, 2023
57Theo KimPausedPro$48.00Nov 11, 2023
58Nia TanakaActiveFree$0.00Jul 17, 2026
59Saanvi PrabhakaranActiveEnterprise$632.00Jun 17, 2023
60Arjun KhanActiveTeam$1,624.00Oct 16, 2025
61Arjun OkaforActivePro$48.00Oct 29, 2026
62Liam TanakaActivePro$24.00Jan 5, 2024
63Amelia KimInvitedFree$0.00Oct 3, 2023
64Amelia SharmaActivePro$36.00Jul 1, 2025
65Olivia MenonPausedEnterprise$1,501.00Jun 16, 2023
66Rohan PatelPausedTeam$1,189.00Oct 7, 2023
67Sofia PrabhakaranInvitedPro$48.00Apr 6, 2023
68Arjun NguyenActivePro$48.00Oct 13, 2024
69Mateo PatelActivePro$36.00Nov 6, 2024
70Meera KimPausedPro$36.00Sep 12, 2024
71Kavya PatelActivePro$12.00Aug 28, 2023
72Yuki ReddyActiveFree$0.00Aug 2, 2025
73Zara KimPausedPro$36.00Aug 9, 2025
74Vihaan PatelActiveFree$0.00Oct 12, 2024
75Saanvi KhanPausedFree$0.00Jun 12, 2026
300 rows
Page 3 of 12
<DataGrid data={data} columns={columns} /> // 10 a page; 10, 20, 50, 100 to choose from
<DataGrid data={data} columns={columns} pagination={{ pageSize: 25 }} /> // 25 a page
<DataGrid data={data} columns={columns} pagination={{ pageSize: 25, pageSizeOptions: [25, 50, 100] }} />
<DataGrid data={data} columns={columns} pagination={false} /> // every row, no pager

The page size comes from pagination.pageSize, else initialState.pagination.pageSize, else 10. The size in use is always offered in the “rows per page” select, even when it is not one of the options, so a persisted or initial size never shows as blank.

<DataGrid data={data} columns={columns} initialState={{ pagination: { pageIndex: 2, pageSize: 25 } }} />

pageIndex is zero-based: 2 is page 3. With persist on, the saved page size wins over initialState; the page index is never persisted.

DataGridPagination renders, left to right:

Part What it shows
The count “x of y row(s) selected.” when selection is on, otherwise “y rows”. y is the row count after filtering.
Rows per page A select over pageSizeOptions. The label hides on narrow screens; the select stays.
Page x of y The position.
Go to page A number box, shown once there are more than five pages. Type a page and press Enter.
First, previous, next, last Buttons, disabled at the ends. First and last hide below the lg breakpoint.
<DataGrid pager={false} /> // no pager; rows still page
<DataGrid pager={{ showGoTo: true, showSelection: false }} /> // always show the go-to box, never the selected count

When you compose the parts yourself, render <DataGridPagination /> wherever you like, above or below the table. It renders nothing when pagination is false.

  • Paging happens last: after filtering, sorting and grouping, so a page is a slice of the result you see.
  • The page index resets to 0 whenever the result changes: new data, a filter, the search, a sort or a grouping change. That is TanStack’s autoResetPageIndex, on for client-side grids and off for server-side ones. Set table={{ autoResetPageIndex: false }} to keep the page through data updates (polling, say), and reset it yourself with grid.table.setPageIndex(0) when a filter changes.
  • Expanded sub-rows do not count toward the page (paginateExpandedRows: false): a page holds pageSize top-level rows, and their children render beneath them on the same page, so an expanded page shows more than pageSize rows. The same goes for group rows.
  • With paging on, only the current page is in the row model, so virtualisation rarely kicks in; with pagination: false the whole result is one scrolling list and virtualisation takes over past the threshold.
  • The page size is part of the persisted view and of saved views; see persistence.
  • Selection is per row id, so it survives paging: select on page 1, page on, and the count in the pager still includes them.
  • The state is grid.table.state.pagination ({ pageIndex, pageSize }), with setPageIndex, setPageSize, nextPage, previousPage, firstPage, lastPage, getPageCount() and getRowCount() on the table.
Option Type Default What it does
pagination false or object 10 a page; 10, 20, 50, 100 { pageSize?, pageSizeOptions? } sets the size and the choices; false shows every row with no pager.
initialState.pagination object page 1 { pageIndex?, pageSize? }: the starting page and, failing pagination.pageSize, the size.
pager false or object true On <DataGrid>: hide the pager, or configure it with { showSelection?, showGoTo? }.
server.rowCount number The total from the server; server.pageCount when a page is not rowCount / pageSize.
state.pageIndex adapter With state.onPageIndexChange, another owner for the page index (the URL).
table.autoResetPageIndex boolean true client-side, false server-side Back to page 1 when the result changes.
Labels strings English rowsPerPage, pageOf, goToPage, selectedOf and rowsCount in labels; see internationalisation.