-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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] Replace GridAutoSizer
with ResizeObserver
#8091
Conversation
Netlify deploy previewNetlify deploy preview: https://deploy-preview-8091--material-ui-x.netlify.app/ Updated pagesNo updates. These are the results for the performance tests:
|
49f35b7
to
ca35bb0
Compare
|
||
return ( | ||
<div ref={ref} {...props}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This DIV is useless.
setContainerDimensions({ | ||
width: rootRef.current.clientWidth, | ||
height: rootRef.current.clientHeight, | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See #7956 (comment)
@@ -14,8 +14,8 @@ const StyledBox = styled(Box, { | |||
padding: theme.spacing(1), | |||
justifyContent: 'center', | |||
...(isDataGridTest && { | |||
width: 500, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a regression test failing for no reason: https://app.circleci.com/pipelines/github/mui/mui-x/35345/workflows/1608837d-fb6c-4adf-bc68-74b2d338dc00/jobs/202833
It seems that the width changed to 0 during the test. I couldn't simulate this outside the test environment. The way I found to fix it was forcing the container width.
@m4theushw I thing something is wrong when i use datagrid with autoHeight prop. |
@michGreg Can you open an issue with a reproduction example? |
Closes #7297
Fixes #7956