Open GeoffreyHervet opened 3 months ago
This is a tricky one.
You're right about the useMemo
- it's not going to change anything because the columns would be instantiated on dependencies change anyway.
To solve this issue, we need to somehow pass things to the actions
cells without creating columns during render.
I'll think about this.
Is there any issue beyond column width? We could maintain a column width cache to avoid resetting it. Not elegant at all, but column width is kinda special as it can be changed by the end-user without going through the columns prop.
Is there any issue beyond column width?
Yes, column ordering.
Maintaining the column sizes and order makes sense to me. If users need to reset the columns – they can force it by changing the key
on the data grid.
Hello,
Does the label support:commercial
means the ticket is prioritized and the issue will be fixed ?
Thanks
Hello,
I have the same workaround.
Thanks
✌
Steps to reproduce
Link to live example: (required)
Name
columnhttps://github.com/mui/mui-x/assets/617780/1a0c3d63-b152-4eec-8725-34f498903002
Current behavior
When you resize a column (or even you reorder the columns), then you enter in edit mode, you lost the width of the column.
Expected behavior
The column width should not be updated.
Context
If a
useMemo
is used for the column definition, it won't fix the issue, you will have a issue in the action column.getActions
won't have the right value ofrowModesModel
. If in theuseMemo
, you giverowModesModel
as a dependency, you will have the same issue ...Your environment
Search keywords: datagrid edit resize Order ID: Not provided