Access the row instance in the onRowSelectionChange callback function #4810
Unanswered
elliotgonzalez123
asked this question in
Ideas
Replies: 2 comments
-
I assume this is still an 'issue'? |
Beta Was this translation helpful? Give feedback.
0 replies
-
If this feature were implemented, that's great |
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
-
I'd like to propose adding a feature where we can get access to the selected
row
instance in theonRowSelectionChange
callback. Currently, the callback is an updater function that sets the row selection state using and id and a boolean{ 1 : true}
. It would be incredibly useful if the selected row instance is also available in this callback. This would allow us to add therow.original
to another piece of state being managed in the component during theonChange
event.ex:
This will come in handy when creating tables where selecting a row immediately shows or aggregates data in the UI somewhere. The current solution is to do this in a
useEffect
:It would be great to be able to remove this
useEffect
and just do it in the callback. Here is an old discussion on the issue: #2155Beta Was this translation helpful? Give feedback.
All reactions