single line editor comp onChange validations

This commit is contained in:
lohit
2025-05-26 10:20:22 +05:30
parent 4ac2c4ac34
commit 256f63dd38

View File

@@ -107,7 +107,7 @@ class SingleLineEditor extends Component {
_onEdit = () => {
if (!this.ignoreChangeEvent && this.editor) {
this.cachedValue = this.editor.getValue();
if (this.props.onChange) {
if (this.props.onChange && (this.props.value !== this.cachedValue)) {
this.props.onChange(this.cachedValue);
}
}