-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
[data grid] editing with getRowId
for custom id field issue
#17030
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
Comments
hey @roastnewt |
Whoops! Fixed |
getRowId
for custom id field issue
Hey @roastnewt ... It seems the --- a/packages/x-data-grid/src/hooks/features/editing/useGridRowEditing.ts
+++ b/packages/x-data-grid/src/hooks/features/editing/useGridRowEditing.ts
@@ -535,7 +535,7 @@ export const useGridRowEditing = (
return;
}
- const rowUpdate = apiRef.current.getRowWithUpdatedValuesFromRowEditing(row.id);
+ const rowUpdate = apiRef.current.getRowWithUpdatedValuesFromRowEditing(id);
if (processRowUpdate) {
const handleError = (errorThrown: any) => { cc @arminmeh |
@michelengelen what are the differences in v8 to make this work as is? |
Oh, I forgot to update the comment. This actually did not work when I updated all dependencies (fresh install). |
I'll look into this |
Your proposal is fine @michelengelen |
This issue has been closed. If you have a similar problem but not exactly the same, please open a new issue. |
Thank you @arminmeh @michelengelen for the quick turnaround and fix, it is very much appreciated |
Steps to reproduce
Steps:
Current behavior
Datagrid - Editing a row with a custom rowId field and saving throws an error, and the row stays in edit mode
This started occurring when we updated from datagrid premium 7.27.3 to 7.28.0
Expected behavior
Clicking away / hitting enter should save the row and be back in view mode
Context
No response
Your environment
npx @mui/envinfo
Search keywords: getRowId null edit datagrid save
Order ID or Support key 💳 (optional)
75070
The text was updated successfully, but these errors were encountered: