[React] Adding external selection state with different type #5905
Unanswered
StarDust198
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
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