Browse Source

UI: Revert blur in json-content.component

pull/10623/head
Vladyslav_Prykhodko 2 years ago
parent
commit
e53b40f8af
  1. 17
      ui-ngx/src/app/shared/components/json-content.component.ts

17
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<void> = new EventEmitter<void>();
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<AppState>,
@ -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 {

Loading…
Cancel
Save