react-codemirror
react-codemirror copied to clipboard
onChange is called both for user input and for programmatic changes (such as calling setValue)
this issue also occurs on react-codemirror and I want to find a way to prevent onChange is called for programmatic change.
+1
https://github.com/uiwjs/react-codemirror/blob/075531ace9a4e2bc20640f80b6149f2fd295761b/core/src/useCodeMirror.ts#L63
It can be achieved without onChange
prop.
@iamphonghg @eduardocque
@11bit This didn't solve the problem. But it will solve the problem of useCodeMirror.