[DataGrid] Prevent paste operations in non-editable cells (#11984)
- [x] I have followed (at least) the PR section of the contributing guide.
Description
Fixes #11984
- When pasting, only the column's editable property was being referenced, but now the isCellEditable prop is also taken into consideration.
Test results
The table below shows which cells can be overwritten with paste
isCellEditable prop returns true |
isCellEditable prop returns false |
|
|---|---|---|
colDef.editable is true |
:o: | :x: (:o: before the fix) |
colDef.editable is false |
:x: | :x: |
:o: : Can paste, :x: : Can not paste
Deploy preview: https://deploy-preview-12031--material-ui-x.netlify.app/
Generated by :no_entry_sign: dangerJS against 13af851c84fde18fbdea520dbeca4485c0c61194
Thanks for the contribution @ikzhr Would you mind adding a small test for this fix? Also, can you rebase with the latest master branch?
This pull request has been inactive for 30 days. Please remove the stale label or leave a comment to keep it open. Otherwise, it will be closed in 15 days.
This pull request has been closed due to 15 days of inactivity after being marked stale.