[React] Adding external selection state with different type #5905
Unanswered
StarDust198
asked this question in
Q&A
Replies: 1 comment
-
@StarDust198 I am also consider this, given "select all" does not working across pages for server-side pagination The main downside I see is losing filter handling. With the built in row selection, as data is filtered, selected rows update exactly the way I'd hope. With custom selection state, that needs to be rebuilt manually If you ended up doing this, how did it go? |
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.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi there,
I am building a custom React Table component that uses Tanstack Table internally. I received a request to have the controlled row selection state managed externally—in a different format, specifically as an array of row IDs (e.g., ["id1", "id2", ...]). However, Tanstack Table requires the selection state to be an object (with a matching function) rather than an array.
My question is: Is it acceptable to completely bypass Tanstack Table’s built-in row selection state (i.e., not passing the selection state and onRowSelectionChange callback to useReactTable) and manage the selection externally? Will I just lose the benefits of the built-in selection state management, or are there any other drawbacks or caveats to be aware of?
Beta Was this translation helpful? Give feedback.
All reactions