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

onChange is called both for user input and for programmatic changes (such as calling setValue)

Open iamphonghg opened this issue 2 years ago • 3 comments

this issue also occurs on react-codemirror and I want to find a way to prevent onChange is called for programmatic change.

iamphonghg avatar Jan 03 '23 07:01 iamphonghg

+1

eduardocque avatar Jan 27 '23 02:01 eduardocque

https://github.com/uiwjs/react-codemirror/blob/075531ace9a4e2bc20640f80b6149f2fd295761b/core/src/useCodeMirror.ts#L63

It can be achieved without onChange prop.

@iamphonghg @eduardocque

jaywcjlove avatar Feb 06 '23 04:02 jaywcjlove

@11bit This didn't solve the problem. But it will solve the problem of useCodeMirror.

jaywcjlove avatar Feb 09 '23 12:02 jaywcjlove