Skip to content

[DataGrid] Avoid ResizeObserver loop error #17984

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

Merged
merged 1 commit into from
May 26, 2025

Conversation

cherniavskii
Copy link
Member

@cherniavskii cherniavskii commented May 23, 2025

Fixes #16197

While this error is a false alarm (see w3c/csswg-drafts#5488), some tools like CRA use react-error-overlay, which listens to all errors on window and exaggerates the issue.
With requestAnimationFrame used, the error is not emitted, and hopefully, we won't see this reported anymore.

Before: https://stackblitz.com/edit/vh7qvlqz?file=src%2FDemo.tsx
After: https://stackblitz.com/edit/vh7qvlqz-13rnmah5?file=src%2FDemo.tsx

@cherniavskii cherniavskii added component: data grid This is the name of the generic UI component, not the React module! dx Related to developers' experience enhancement This is not a bug, nor a new feature labels May 23, 2025
@mui-bot
Copy link

mui-bot commented May 23, 2025

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

Bundle size report

Total Size Change:${\tiny{\color{red}▲}}$+186B(0.00%) - Total Gzip Change:${\tiny{\color{red}▲}}$+95B(0.00%)
Files: 118 total (0 added, 0 removed, 6 changed)

Show 6 more bundle changes

@mui/x-data-gridparsed:${\tiny{\color{red}▲}}$+31B(+0.01%) gzip:${\tiny{\color{red}▲}}$+14B(+0.01%)
@mui/x-data-grid-premiumparsed:${\tiny{\color{red}▲}}$+31B(+0.01%) gzip:${\tiny{\color{red}▲}}$+17B(+0.01%)
@mui/x-data-grid-premium/DataGridPremiumparsed:${\tiny{\color{red}▲}}$+31B(+0.01%) gzip:${\tiny{\color{red}▲}}$+18B(+0.01%)
@mui/x-data-grid-proparsed:${\tiny{\color{red}▲}}$+31B(+0.01%) gzip:${\tiny{\color{red}▲}}$+18B(+0.01%)
@mui/x-data-grid-pro/DataGridProparsed:${\tiny{\color{red}▲}}$+31B(+0.01%) gzip:${\tiny{\color{red}▲}}$+15B(+0.01%)
@mui/x-data-grid/DataGridparsed:${\tiny{\color{red}▲}}$+31B(+0.01%) gzip:${\tiny{\color{red}▲}}$+13B(+0.01%)

Details of bundle changes

Generated by 🚫 dangerJS against 5c29002

@cherniavskii cherniavskii requested a review from romgrk May 23, 2025 21:41
@cherniavskii cherniavskii marked this pull request as ready for review May 23, 2025 21:48
@cherniavskii cherniavskii added needs cherry-pick The PR should be cherry-picked to master after merge v7.x labels May 26, 2025
@cherniavskii cherniavskii merged commit 42c29c0 into mui:master May 26, 2025
33 checks passed
@cherniavskii cherniavskii deleted the resizeoverserver-loop-error branch May 26, 2025 11:16
Copy link

Cherry-pick PRs will be created targeting branches: v7.x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: data grid This is the name of the generic UI component, not the React module! dx Related to developers' experience enhancement This is not a bug, nor a new feature needs cherry-pick The PR should be cherry-picked to master after merge v7.x
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[data grid] ResizeObserver loop error when using getRowHeight = {() = 'auto'}
3 participants