I have created a react-table in Material UI. Here I got a task like expanding the row. I did that expansion functionality But I don't know how to get the expanded value over there.
Here is the working demo.
Please tell me how to get the expanded row value in that. Like that entire row object
The row object should be under row.original
. You can try something like this to test it:
{
row.isExpanded ? (
<tr>
<td>
{`hello ${JSON.stringify(row.original, null, 2)}}`}
{console.log("originalObj === ", row.original)}
</td>
</tr>
) : null;
}
The above code won't look pretty when rendered, but it should help you achieve your goal :)