on-internet
← Community

How can I keep the nested collapsible table row inside main tabe row in mui table react?

Stack Overflow ·

I have a Material UI (MUI) table with a border color and background color. Each table row needs to have a collapsible table row. MUI's documentation shows a separate table row and uses React.Fragment, but I want to nest the collapsible table row inside the main table row. This way, the border color and background color remain consistent across all rows, even when collapsed. Currently, since the rows are separate, the background and border color only apply to the first table row. I tried putting the collapsible table row inside the first table row, but the UI looks weird. I also tried condition

Comments

Sign in or sign up to comment and upvote.

No comments yet.