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

[DataGrid] Prevent paste operations in non-editable cells (#11984)

Open ikzhr opened this issue 1 year ago • 2 comments

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

ikzhr avatar Feb 11 '24 05:02 ikzhr

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

Generated by :no_entry_sign: dangerJS against 13af851c84fde18fbdea520dbeca4485c0c61194

mui-bot avatar Feb 11 '24 05:02 mui-bot

Thanks for the contribution @ikzhr Would you mind adding a small test for this fix? Also, can you rebase with the latest master branch?

arminmeh avatar Aug 22 '24 10:08 arminmeh

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.

github-actions[bot] avatar Mar 28 '25 03:03 github-actions[bot]

This pull request has been closed due to 15 days of inactivity after being marked stale.

github-actions[bot] avatar Apr 12 '25 15:04 github-actions[bot]