-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[data grid] Flickering on tab / panel change for data grid when using flex
columns
#11577
Comments
flex
columnsflex
columns
Hey @romgrk ... could you have a look? Or ideally know from the top of your head why that flicker happens? Thanks! 🙇🏼 |
The Check here, only the first panel "PanelHidden" flickers now, and not the second one "PanelNotMounted": https://codesandbox.io/p/sandbox/columnfluidwidthgrid-material-demo-forked-jl4vn5?file=%2FTabComponent.js%3A72%2C32 |
This has been an ongoing issue for me as well. Correctly fixing the issue inside mui-x would be ideal, but I would certainly welcome a workaround in the meantime if anyone has one. My gratitude to everyone for all of the hard work. |
my current solution was to just update the key for the DataGrid component based on a tab change, forcing the component to unmount. the DataGrid rendering is fast enough that its not an issue for me, its my other charts that i wanted to avoid re rendering. unfortunately, @romgrk's solution doesn't quite work for me as i'm trying to avoid mounting/unmounting the entire Demo on every tab change |
Have you tried using styling instead of the HTML
|
The issue has been inactive for 7 days and has been automatically closed. If you think that it has been incorrectly closed, please reopen it and provide missing information (if any) or continue the last discussion. |
Steps to reproduce
Link to live example: (required)
Code sandbox of the issue here:
https://codesandbox.io/p/sandbox/columnfluidwidthgrid-material-demo-forked-wf2v7j?file=%2FTabComponent.js%3A62%2C53
The top panel shows how it should look. It seems to be working since the component is mounted, and this issue seems to be fixed on initial mount: https://github.com/mui/mui-x/pull/3213/files
Steps:
Current behavior
When I switch tabs with flex columns, they start small and then expand. This doesn't happen on mount, but does happen when i switch tabs.
Expected behavior
No flickering / tab size should stay
Context
We have a page that is decently heavy (lots of charts etc, not just data grids), so we don't want to have to resort to mounting the content to resolve the flickering.
This seems related to #3213, and looks like it was fixed on initial load
Your environment
npx @mui/envinfo
Search keywords: flickering grid datagrid flex
The text was updated successfully, but these errors were encountered: