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 RangeError when using flex columns #9554

Conversation

@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 Jul 3, 2023
@mui-bot
Copy link

mui-bot commented Jul 3, 2023

Netlify deploy preview

Netlify deploy preview: https://deploy-preview-9554--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 308.8 494.8 402 386.28 69.804
Sort 100k rows ms 463.7 933.1 791.3 755.18 161.383
Select 100k rows ms 156.6 318 223.1 231.36 52.187
Deselect 100k rows ms 142.4 279.6 197.7 193.76 49.123

Generated by 🚫 dangerJS against cd47563

@cherniavskii cherniavskii added regression A bug, but worse and removed bug 🐛 Something doesn't work labels Jul 3, 2023
@@ -122,9 +122,9 @@ export function useGridDimensions(
};

const scrollInformation = hasScroll({
content: { width: columnsTotalWidth, height: rowsMeta.currentPageTotalHeight },
content: { width: Math.round(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 #9516 I didn't anticipate the floating point precision error 😅
Rather than removing Math.round, it would make more sense to use it on both sides of the equation (content width and container width)

@cherniavskii cherniavskii merged commit e85087f into mui:master Jul 4, 2023
6 checks passed
@cherniavskii cherniavskii deleted the fix-rangeError-with-duplicated-flex-fields branch July 4, 2023 19:16
@cherniavskii cherniavskii changed the title [DataGrid] Fix RangeError when flex columns have duplicated field property [DataGrid] Fix RangeError when using flex columns Jul 6, 2023
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.

RangeError Maximum call stack size exceeded
3 participants