Toggle Row Expanded on Two Different Columns #3494
Unanswered
ebs-hkotrolos
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm using react-table (7.7.0) to render some tables within an application.
I've obfuscated and leaned out my code so missing bracket's or incorrect syntax may exist.
On a simple level, I have a single row, two columns. Each column has a really long description which is shorten and then has a "Show More" button to toggle a new row with the full description.
My column definition is as follows:
My react-table component and it's Subcomponent are as follows:
Sub Component
As you can see, in the sub component I am grabbing the 'row.values.column1' data in the expanded row and showing that.
This posses an issue where clicking on the second column will still show column one's full description.
Is there a way for me to grab the access/ID of the column in the sub-component depending on which cell is clicked (i.e getToggleRowExpandedProps) to then show the full description of that respective cell.
Thanks
Beta Was this translation helpful? Give feedback.
All reactions