custom row selection state
hey. is there any way to get the whole row data object for the selected row in row selection state? row selection state defaults to index of the row or we can change it to
row._id
. But i want to get the row selection state just like how AG-Grid returns it, that is, array of objects, where objects correspond to the row data for each selected row.2 Replies
xenial-black•5h ago
I think you can just map the data to
row.original
, and have the original object for each row.optimistic-goldOP•3h ago
i am mapping the selected row with its data and storing that into redux. This happens inside a useEffect that runs whenever row selection state changes. I take the id of the selected row and find it inside a cache having id as the key and data object as value (for faster search).
Then i dispatch this array of row data objects to redux, and use it in the app.
are you also referring to this way for mapping the selected row with its data?