I am working on implementing a Material UI (MUI) table that includes collapsible table rows. The challenge I am facing is maintaining consistent border and background colors across all the rows, even when some are collapsed. Currently, the separate rows are causing issues with applying the styles uniformly. I have attempted to nest the collapsible rows within the main table row to address this issue but have encountered some display problems.
To achieve the desired outcome, I have experimented with different solutions such as conditionally removing borders based on the row state or adjusting the structure of the table. However, none of these approaches have provided the expected result due to spacing issues.
If you have any insights or suggestions on how to tackle this problem effectively while ensuring consistency in the styling of the table rows with collapsible sections, I would greatly appreciate your assistance!
For reference, below is the code snippet and a link to the CodeSandbox:
// Insert code here