[DataGridPro] Keep row children expansion state on CRUD operation #8676
Labels
component: data grid
This is the name of the generic UI component, not the React module!
support: commercial
Support request from paid users
Order ID or Support key 💳 (optional)
2950157729
Duplicates
Latest version
The problem in depth 🔍
I am implementing a CRUD use case for the tree data. If a row is expanded while a new child row is created, the new row is created but the parent row gets collapsed. With a huge dataset it makes it difficult to track where the new row was inserted.
I have tried to programatically toggle the expansion using
apiRef.current.setRowChildrenExpansion(id, true)
with no luck. Can you advise on how to achieve this?Steps to reproduce
Link to live example: https://codesandbox.io/s/thirsty-matan-k00vn4?file=/src/TreeData.tsx
Reproducible on Chrome and Safari.
Expected behaviour
The US row should remain expanded after the new row is inserted.
Your environment 🌎
`npx @mui/envinfo`
The text was updated successfully, but these errors were encountered: