How to get selected rows data outside Table component?
Hi, I'm having trouble with getting selected rows data outside Table component: My table component looks like on the image. Do you have any idea how to access it in parent component ? Thank you for attention.

3 Replies
unwilling-turquoise•3y ago
Here's what I ended up doing. Using v8 and TypeScript btw, not sure how previous versions handle row selection and table state. Once the selected rows change, I update the internal state of the table component. Then, I use a useEffect hook to call a onRowSelectionChange callback with the selected rows. This way, the parent component can access the selected rows at the time the selection changes.
sunny-greenOP•3y ago
Thanks. It works, i have version 7.8.0 . But the whole concept helped me. I used useTable instead useReactTable , and in useEffect I used other method provided and it worked.
sunny-greenOP•3y ago
selectedFlatRows worked
