-
-
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] Error when changing rowModesModel
and rows
at the same time
#13358
Comments
Hey @sorensenmarius ... thanks for raising an issue here. Tomorrow i'll have a look! 💪🏼 |
rowModesModel
and rows
at the same time
Hey @sorensenmarius I did manage to "fix" the error. Somewhat. I did try some things out and the solution I came up with was holding both items, For some reason though the internal state of the data grid is not, so that I always end up in a weird state where the rows from the previous manual state get re-added, but without being in edit state. Here is the updated example of that: DEMO I would need to do some more testing to see if this can be possible without this issue. |
Thanks! I have a lot of functionality around this, so this would be kinda ugly for my implementation. I'll just roll back to version 6 for now and wait for a fix if you can find one 😊 |
For now I cannot find a solution that works with the current version. |
It seems that the bug was introduced in this PR, which was included in v7.5.0. #13056 |
Steps to reproduce
Link to live example: https://stackblitz.com/edit/react-wbis3e?file=Demo.tsx
Steps:
Current behavior
Crashes with the following error
Error: MUI X: The data grid component requires all rows to have a unique
id
property.Alternatively, you can use the
getRowId
prop to specify a custom id for each row.A row was provided without id when calling updateRows():
{}
Expected behavior
Should set the new rows to the row parameter and the new computed rowModesModel to the rowModesModel parameter without raising an error.
Context
I want all my cells to be in edit mode at all times. This worked perfectly in 6.19.5, but no longer works on the latest version (7.6.1).
Your environment
npx @mui/envinfo
This is regardless of browser.
Search keywords: datagridpro
The text was updated successfully, but these errors were encountered: