[v8] Expanding rows. How to render custom component that spans all columns? #4187
-
Hi, I have followed the row expanding example. When expanded, It allows me to render a custom component within a single cell. When expanded, how can I render a custom component that spans all columns of a row? Note: in my case, subrows contains a single child object... not an array. So i'm wrapping the child in an array getSubRows: row => {
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
I found subrows more geared towards when the expanded rows followed the same shape as the parent, so rather than using row.getToggleExpandedHandler() I used row.toggleExpanded() which means you don't have to fake a sub row for the toggle to work as expected. Then I would conditionally display a table row with one cell that's col width is colSpan={props.table.getAllLeafColumns().length} |
Beta Was this translation helpful? Give feedback.
I found subrows more geared towards when the expanded rows followed the same shape as the parent,
so rather than using row.getToggleExpandedHandler() I used row.toggleExpanded() which means you don't have to fake a sub row for the toggle to work as expected.
Then I would conditionally display a table row with one cell that's col width is colSpan={props.table.getAllLeafColumns().length}