Skip to content

[DataGridPro] Ignore rowCount response when new children are fetched with the data source #17711

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

arminmeh
Copy link
Contributor

@arminmeh arminmeh commented May 6, 2025

Closes #17626

v7 ignored undefined values for the rowCount while fetching children
https://github.com/mui/mui-x/blob/v7.x/packages/x-data-grid-pro/src/hooks/features/dataSource/useGridDataSource.ts#L185

v8 sets it to -1

I think that we can remove this altogether as it does not make sense to update root row count while updating children.
If you do, you don't have a mean to update the data via the same response, so your count cannot be correct.

@arminmeh arminmeh requested a review from a team May 6, 2025 08:53
@arminmeh arminmeh added bug 🐛 Something doesn't work component: data grid This is the name of the generic UI component, not the React module! plan: Pro Impact at least one Pro user feature: Server integration Better integration with backends, e.g. data source labels May 6, 2025
@mui-bot
Copy link

mui-bot commented May 6, 2025

Deploy preview: https://deploy-preview-17711--material-ui-x.netlify.app/

Generated by 🚫 dangerJS against 87790dd

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work component: data grid This is the name of the generic UI component, not the React module! feature: Server integration Better integration with backends, e.g. data source plan: Pro Impact at least one Pro user
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[data grid] rowCount set to -1 when fetching child rows in server-side Tree Data
2 participants