-
-
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
[data grid] Entering in edit mode, reload column configuration #12429
Comments
This is a tricky one. To solve this issue, we need to somehow pass things to the |
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. |
Yes, column ordering. |
Hello, Does the label Thanks |
Hello, I have the same workaround. Thanks ✌ |
A rather simple client world workaround is to listen for |
For context, the root cause here is that users are expecting the grid to be both in controlled mode (if the I'm not sure if we had discussed any solution for the issue. The suggestion I made above would not work and would cause bugs for some use-cases. Imho we should define what controlled and uncontrolled modes are, and don't mix the paradigms. We could also make it easier for users to understand how to use the grid in both modes. |
This can be solved by passing things to the component returned by Related: #6220 |
came here after i had already implemented. Used onColumnWidthChange and useState to save widths and apply to columns no issues like @Csszabi98 suggested |
Steps to reproduce
Link to live example: (required)
Name
columnexample.mp4
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
The text was updated successfully, but these errors were encountered: