Skip to content
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

[DataGrid] Fix Maximum call stack size exceeded error when using fractional width #9516

Merged

Conversation

cherniavskii
Copy link
Member

@cherniavskii cherniavskii commented Jun 28, 2023

@cherniavskii cherniavskii added bug 🐛 Something doesn't work component: data grid This is the name of the generic UI component, not the React module! labels Jun 28, 2023
@mui-bot
Copy link

mui-bot commented Jun 28, 2023

Netlify deploy preview

Netlify deploy preview: https://deploy-preview-9516--material-ui-x.netlify.app/

Updated pages

No updates.

These are the results for the performance tests:

Test case Unit Min Max Median Mean σ
Filter 100k rows ms 310.7 582.2 425 425.86 105.726
Sort 100k rows ms 484.7 966.1 905.2 791.82 187.865
Select 100k rows ms 195.7 258.9 254.8 236.56 25.184
Deselect 100k rows ms 136.4 309.6 252 228.66 72.679

Generated by 🚫 dangerJS against 2ed06a5

@@ -122,7 +122,7 @@ export function useGridDimensions(
};

const scrollInformation = hasScroll({
content: { width: Math.round(columnsTotalWidth), height: rowsMeta.currentPageTotalHeight },
content: { width: columnsTotalWidth, height: rowsMeta.currentPageTotalHeight },
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In #9236 we started to use fractional size. Rounding the columns total width breaks the equality comparison

@cherniavskii cherniavskii marked this pull request as ready for review June 29, 2023 07:40
@cherniavskii cherniavskii requested a review from m4theushw June 29, 2023 07:41
@cherniavskii cherniavskii merged commit 5c5762f into mui:master Jun 30, 2023
@cherniavskii cherniavskii deleted the fix-fractional-width-causing-range-error branch June 30, 2023 08:13
@cherniavskii cherniavskii mentioned this pull request Jun 30, 2023
1 task
@cherniavskii cherniavskii added regression A bug, but worse and removed bug 🐛 Something doesn't work labels Jun 30, 2023
@AnastasiaEvgenia
Copy link

AnastasiaEvgenia commented Jul 4, 2023

Hi.
This error still exists in version 6.9.1.
This seems to be happening sometimes if you start resizing your grid.

Sand box
https://codesandbox.io/s/maximum-call-stack-size-exceeded-zhz6dw?file=/package.json
Untitled video - Made with Clipchamp
Screenshot_1733

@cherniavskii
Copy link
Member Author

Thanks @AnastasiaEvgenia
It should be fixed by #9554

@seemX17
Copy link

seemX17 commented Sep 6, 2023

Fixed with latest version 6.12.1 :) Was facing similar issue

Screen Shot 2023-09-06 at 11 57 10 AM

@gaisdav
Copy link

gaisdav commented May 9, 2024

same error in "@mui/x-data-grid-pro": "7.1.1", anyone know how to fix?

@cherniavskii
Copy link
Member Author

@gaisdav Are you sure it's the "Maximum call stack size exceeded" error?
There was a similar (yet different) issue reported in #12851 and fixed in 7.3.1

If the issue linked above is unrelated to the issue you're experiencing, please open a new issue with a minimal reproduction example. Thanks!

@gaisdav
Copy link

gaisdav commented May 9, 2024

@cherniavskii yes, let me show the error.

I'm still trying to figure out why I'm getting this error in my case.

Screenshot 2024-05-09 at 18 37 24

@cherniavskii
Copy link
Member Author

@gaisdav Hmm, this looks like #11483 (comment)
Can you create a reproduction example and share it in #11483?

@gaisdav
Copy link

gaisdav commented May 10, 2024

@cherniavskii
I'll try, thanks!

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! regression A bug, but worse
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[DataGrid] Throws "Maximum call stack size exceeded"
6 participants