From e53b40f8af860c0c9d1cd94503373ac85a15dda2 Mon Sep 17 00:00:00 2001 From: Vladyslav_Prykhodko Date: Wed, 24 Apr 2024 13:14:37 +0300 Subject: [PATCH] UI: Revert blur in json-content.component --- .../shared/components/json-content.component.ts | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) 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 {