-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
[DataGridPro] Fix duplicate nested rows for dynamically updated row IDs #18526
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
[DataGridPro] Fix duplicate nested rows for dynamically updated row IDs #18526
Conversation
Deploy preview: https://deploy-preview-18526--material-ui-x.netlify.app/ Bundle size report
|
Co-authored-by: Andrew Cherniavskii <andrew.cherniavskii@gmail.com> Signed-off-by: Bilal Shafi <bilalshafidev@gmail.com>
Why can't we handle this within the data source logic in a similar way lazy loading is done? |
That's a good point. Combined with a |
packages/x-data-grid/src/hooks/features/filter/gridFilterSelector.ts
Outdated
Show resolved
Hide resolved
This approach looks cleaner to me too. Thanks for the suggestion @arminmeh. |
I see an error on a second open of a group in the first demo on
|
Reported in https://mui.zendesk.com/agent/tickets/28655
Reproduction Tree Data: https://stackblitz.com/edit/vwnrw8kg?file=src%2FDemo.tsx
Reproduction Row Grouping: https://stackblitz.com/edit/cqu1xgfv?file=src%2FDemo.tsx
For the nested Data Source rows (tree data and row grouping), if the IDs of rows are constantly updating the Data Grid treats them as new rows and doesn't remove the previous ones. This PR aims to fix that.