-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[data grid] Is it possible to have tree data row children open and under that details panel? #12088
Comments
Hi @bojanmitic, do you want to open the detail panels for all children at the same time? |
No, I would like to open all row children and one detail panel for that row. LIke in a photo, there is row then two children that are tree data, and under that details panel. |
Ah, so the parent row has a detail and children and you want to open the children tree and the detail panel as well. Gotcha! Let me look if this is possible ... It feels like it should! Stay tuned! |
@bojanmitic Is this similar to something you are trying to achieve: https://stackblitz.com/edit/react-mhffnh?file=Demo.tsx ? |
Hi @MBilalShafi, Thank you for your answer. It is similar to what I would like, the only difference is that I would like to open both, tree data children and detail panel with one button( one click). And I would like child rows to come first and then details panel. Is that possible? BTW I have only one level of children and panel is only for parent row, children don't have panel, please check photo in the description for more details. |
Hey @bojanmitic I did play around a bit with the demo provided by @MBilalShafi as well and could manage to reach a bit more feature parity. The only thing I could not manage to achieve is the rendering order you need. The detail panel will always come first and the children rows will come after that. I am not sure if this is even possible to do. Here is my example. Would that fit your needs? @cherniavskii would you have any idea if we can manage to restructure this? |
Hi @michelengelen thank you for your answer, This seems pretty close to what I need, except as you said order of child rows and detail panel. |
Hey @bojanmitic ... I am sorry that I couldn't help you any further. |
Hmm, I don't think it's possible to support this use case without changes in the Data Grid. I'm adding the |
The problem in depth
On some rows we would like to show both, tree data child rows and underneath detail panel with some more data. Those are working well independently, but as I try to trigger both at the same time I noticed that detail panel overrides and set somehow
childrenExpanded
to false and I can see only detail panel. Is it possible to have both open.here is code that triggers those, as I said they work well independently, even if I set children expansion to be true always, that get override somehow
onClick={() => { (params as any).api.setRowChildrenExpansion(params.row.id, true); isPanelExpanded ? setDetailPanelIds(filterOutId) : setDetailPanelIds(addId); }}
And this is what I would like:
Your environment
`npx @mui/envinfo`
Search keywords: tree data together with details panel
Order ID: 69131
The text was updated successfully, but these errors were encountered: