mui-x
mui-x copied to clipboard
[DataGrid] Fix `rowModesModel` controlled prop
Closes https://github.com/mui/mui-x/issues/11423
I need this to work for Toolpad. Instead of creating workarounds, might as well just fix it at the root.
The problem seems to be that updateStateToStopRowEditMode in the loop doesn't run. rowModesModel is an empty object and thus the .forEach doesn't run. This PR adjusts the logic and runs the loop for each property of both previous and current rowModesModel. If the current one doesn't contain a model for a row, it assumes it's in view mode.
Deploy preview: https://deploy-preview-13056--material-ui-x.netlify.app/
Generated by :no_entry_sign: dangerJS against a26069a96144b4dd65cf5be26b5e45c9ae825239