diff --git a/ui-ngx/src/app/shared/components/json-content.component.ts b/ui-ngx/src/app/shared/components/json-content.component.ts index dfcfcfbf3f..d79feacfbc 100644 --- a/ui-ngx/src/app/shared/components/json-content.component.ts +++ b/ui-ngx/src/app/shared/components/json-content.component.ts @@ -18,13 +18,11 @@ import { ChangeDetectorRef, Component, ElementRef, - EventEmitter, forwardRef, Input, OnChanges, OnDestroy, OnInit, - Output, SimpleChanges, ViewChild, ViewEncapsulation @@ -104,9 +102,6 @@ export class JsonContentComponent implements OnInit, ControlValueAccessor, Valid @coerceBoolean() required: boolean; - @Output() - blur: EventEmitter = new EventEmitter(); - fullscreen = false; contentBody: string; @@ -116,7 +111,6 @@ export class JsonContentComponent implements OnInit, ControlValueAccessor, Valid errorShowed = false; private propagateChange = null; - private onTouched = () => {}; constructor(public elementRef: ElementRef, protected store: Store, @@ -156,14 +150,12 @@ export class JsonContentComponent implements OnInit, ControlValueAccessor, Valid this.updateView(); } }); - this.jsonEditor.on('blur', () => { - if (this.validateContent) { + if (this.validateContent) { + this.jsonEditor.on('blur', () => { this.contentValid = this.doValidate(true); this.cd.markForCheck(); - } - this.onTouched(); - this.blur.next(); - }); + }); + } if (this.tbPlaceholder && this.tbPlaceholder.length) { this.createPlaceholder(); @@ -251,7 +243,6 @@ export class JsonContentComponent implements OnInit, ControlValueAccessor, Valid } registerOnTouched(fn: any): void { - this.onTouched = fn; } setDisabledState(isDisabled: boolean): void {