#React Table v7 - Expanded rows

2 messages · Page 1 of 1 (latest)

sharp pumice
#

Hello,

I have implemented expandable rows in my react component with 2 levels nesting; something along the lines of rounds > groups > matches

So what i ended up having is a table rendering rows of individual rounds, and whenever i click one it will expand and a row of the relevant group will show up and so on

Let's say i am already at the match row level; The way i'm capturing its id is by doing as follows: row.original.id - What i would also like to do is capture its parent rows ids, in which case it's the relevant group and round id. How do i that?

Thanks in advance~

#

TL;DR: how do i get access to the parent row's data if i click on a sub-row?