-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Description
TanStack Table version
8.5.11
Framework/Library version
react 18
Describe the bug and the steps to reproduce it
Hi,
I'm encounter issue when using row selection with manual server side pagination.
My issue is related to the header checkbox.
Let's say we have 2 pages, 10 rows in each page and 14 total rows. It means the first page has 10 rows and second has 4 rows.
Scenario 1 -
Select 3 rows on the first page. Move to the next page. The header checkbox is indeterminate.
Scenario 2 -
Select 4 rows on the first page. Move to the next page. The header checkbox is unchecked.
Looks like the issue is in getIsSomeRowsSelected where it's comparing total selected rows with table.getFilteredRowModel().flatRows.length
which is the total page's row count on manual pagination.
I was managed to reproduced the issue using query router param example while adding selections features from row selection example.
Your Minimal, Reproducible Example - (Sandbox Highly Recommended)
https://stackblitz.com/edit/react-v6yfaiij?file=src%2Fcomponents%2FBasicTable.js
Screenshots or Videos (Optional)
Screen.Recording.2025-06-17.at.15.07.09.mov
Do you intend to try to help solve this bug with your own PR?
None
Terms & Code of Conduct
- I agree to follow this project's Code of Conduct
- I understand that if my bug cannot be reliable reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.