mui-x icon indicating copy to clipboard operation
mui-x copied to clipboard

[DataGrid] Fix `rowModesModel` controlled prop

Open Janpot opened this issue 1 year ago • 1 comments

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.

Janpot avatar May 08 '24 15:05 Janpot

Deploy preview: https://deploy-preview-13056--material-ui-x.netlify.app/

Generated by :no_entry_sign: dangerJS against a26069a96144b4dd65cf5be26b5e45c9ae825239

mui-bot avatar May 08 '24 15:05 mui-bot