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 dimensions lag issue after autosize #13587

Merged
merged 2 commits into from
Jun 25, 2024

Conversation

MBilalShafi
Copy link
Member

Fixes #12940

@MBilalShafi MBilalShafi added bug 🐛 Something doesn't work component: data grid This is the name of the generic UI component, not the React module! feature: Column resize labels Jun 22, 2024
@mui-bot
Copy link

mui-bot commented Jun 22, 2024

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

Generated by 🚫 dangerJS against 9e5235b

@MBilalShafi MBilalShafi changed the title [DataGrid] Experiment: Fix dimensions lag issue after autosize [DataGrid] Fix dimensions lag issue after autosize Jun 24, 2024
@MBilalShafi MBilalShafi marked this pull request as ready for review June 24, 2024 10:04
@MBilalShafi MBilalShafi requested a review from romgrk June 24, 2024 10:04
@MBilalShafi MBilalShafi enabled auto-merge (squash) June 25, 2024 11:07
@@ -302,26 +303,25 @@ export function useGridDimensions(
}, [apiRef, savedSize, updateDimensions]);

const root = apiRef.current.rootElementRef.current;
const dimensions = apiRef.current.state.dimensions;
Copy link
Member

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 🤔

Copy link
Member Author

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? 🤔

Copy link
Member

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 😆

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work component: data grid This is the name of the generic UI component, not the React module! feature: Column resize
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[data grid] Column autosizing calculated on old data instead of new data
4 participants