monaco-react icon indicating copy to clipboard operation
monaco-react copied to clipboard

fix: Prevent onChange from firing when updating value in readOnly mode

Open togo5 opened this issue 1 year ago • 0 comments

Close #504

As mentioned in the Issue, this is a fix for the bug where updating the value triggers onChange when the Editor's readOnly is set to true.

Specifically, I limited the triggering of onChange by setting preventTriggerChangeEvent.current = true; even when readOnly is true.

togo5 avatar Apr 06 '24 08:04 togo5