Replies: 1 comment
-
@tannerlinsley Any suggestions? :) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Below, I am sharing the code that I have written so far for row selection:
What does the code do?
It fetches the paginated data from the server related to some categories - (Cat1 dataset, Cat2 dataset, Cat3 dataset)
Issue?
Row selection works well with data that resides locally.
But, let's say the paginated data is being fetched from the server, the limit is set to 10 per page and you have selected 7 rows from the 1st page. Now, go to page 2 and select 3 rows from the second page once the data is fetched. The Select All checkbox is unticked on page two whereas it should show indeterminate.
I believe this happens because row selection is only aware of 10 items per page. Although it has a memory of selected rows, it's not aware of out of how many items those rows were selected.
I see it used to work as expected in react-table v7 - https://codesandbox.io/s/react-table-server-side-pagination-row-select-5gfrp
I have created a code sandbox to reproduce the issue:
https://codesandbox.io/s/pedantic-austin-uqt9ry?file=/src/table.tsx
Beta Was this translation helpful? Give feedback.
All reactions