|
|
|
@ -91,6 +91,8 @@ export class JsonObjectEditComponent implements OnInit, ControlValueAccessor, Va |
|
|
|
|
|
|
|
errorShowed = false; |
|
|
|
|
|
|
|
ignoreChange = false; |
|
|
|
|
|
|
|
private propagateChange = null; |
|
|
|
|
|
|
|
constructor(public elementRef: ElementRef, |
|
|
|
@ -118,8 +120,10 @@ export class JsonObjectEditComponent implements OnInit, ControlValueAccessor, Va |
|
|
|
this.jsonEditor.session.setUseWrapMode(false); |
|
|
|
this.jsonEditor.setValue(this.contentValue ? this.contentValue : '', -1); |
|
|
|
this.jsonEditor.on('change', () => { |
|
|
|
this.cleanupJsonErrors(); |
|
|
|
this.updateView(); |
|
|
|
if (!this.ignoreChange) { |
|
|
|
this.cleanupJsonErrors(); |
|
|
|
this.updateView(); |
|
|
|
} |
|
|
|
}); |
|
|
|
this.editorResize$ = new ResizeObserver(() => { |
|
|
|
this.onAceEditorResize(); |
|
|
|
@ -225,7 +229,9 @@ export class JsonObjectEditComponent implements OnInit, ControlValueAccessor, Va |
|
|
|
//
|
|
|
|
} |
|
|
|
if (this.jsonEditor) { |
|
|
|
this.ignoreChange = true; |
|
|
|
this.jsonEditor.setValue(this.contentValue ? this.contentValue : '', -1); |
|
|
|
this.ignoreChange = false; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|