-
-
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
[DataGrid] onColumnVisibilityModelChange
gets triggered when columnVisibilityModel
is provided and column width is changed.
#3725
Comments
Update: Here is the cleaner sandbox that indicates the issue with visibility change getting triggered on resize of the column. Using DataGridPro. https://codesandbox.io/s/visiblecolumnsmodelcontrolled-material-demo-forked-sisyo?file=/demo.js |
Thanks @tielushko ! |
Good catch, I'm resetting the visibility status of all the columns when updating just on column. |
Thanks @flaviendelangle for your quick effort! |
onColumnVisibilityModelChange
gets triggered when columnVisibilityModel
is provided and column width is changed.
I have this version on my project and the issue still remains. "@mui/x-data-grid-premium": "^5.17.26", |
@flaviendelangle I'm also experiencing same issue. |
@michelengelen I let you handle this one 🙏 |
@sandronominal Can't reproduce: https://codesandbox.io/p/sandbox/visiblecolumnsmodelcontrolled-material-demo-forked-t39l45 |
Duplicates
Latest version
Current behavior 😯
The onColumnVisibilityModelChange event gets fired when provided with initial columnVisibilityModel and resizing column width.
In my application, I have the custom width preferences that I store for the columns. When I use the controlled columnVisibilityModel however, the resize of the column triggers the onColumnVisibilityModelChange.
Please see the sandbox here:
Sandbox
Expected behavior 🤔
Resizing the column should not trigger the onColumnVisibilityModelChange event.
Steps to reproduce 🕹
Steps:
Context 🔦
No response
Your environment 🌎
`npx @mui/envinfo`
Order ID 💳 (optional)
31986
The text was updated successfully, but these errors were encountered: