-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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 dimensions lag issue after autosize #13587
Conversation
Deploy preview: https://deploy-preview-13587--material-ui-x.netlify.app/ |
packages/x-data-grid/src/hooks/features/dimensions/useGridDimensions.ts
Outdated
Show resolved
Hide resolved
@@ -302,26 +303,25 @@ export function useGridDimensions( | |||
}, [apiRef, savedSize, updateDimensions]); | |||
|
|||
const root = apiRef.current.rootElementRef.current; | |||
const dimensions = apiRef.current.state.dimensions; |
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.
I'd be curious to know why the material-ui/no-direct-state-access
linting rule did not catch it 🤔
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.
I was under the impression this rule is not activated, as there are multiple instances where we do direct state access around the code base. Should it detect all the instances? 🤔
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.
I don't know, Matheus created it I think, since it's a rule that is mostly here for us, if it does not work maybe we can fix it or drop it 😆
Fixes #12940