Row selection with controlled pagination #2661
-
Hi, I have a table with controlled pagination from server and row selection. But, I am trying to implement the behaviour I want and don't know what is the best option. I would expect to have something like selectedRowIds and selectedFlatRows, as I am using them in other parts of my code. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
You need to set https://codesandbox.io/s/react-table-server-side-pagination-row-select-5gfrp |
Beta Was this translation helpful? Give feedback.
You need to set
autoResetSelectedRows: false
and you need to addgetRowId: (row) => row.key
so it doesn't use idx as id and of course add a fieldkey
to your data structure and make sure the keys are unique.https://codesandbox.io/s/react-table-server-side-pagination-row-select-5gfrp