From 571d4f0dbdf7537f37d34de97b561ea3c5e5c838 Mon Sep 17 00:00:00 2001 From: ArtemDzhereleiko Date: Thu, 30 Sep 2021 15:27:57 +0300 Subject: [PATCH] Update json value for correct working --- ui-ngx/src/app/shared/components/value-input.component.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ui-ngx/src/app/shared/components/value-input.component.ts b/ui-ngx/src/app/shared/components/value-input.component.ts index 41333096e9..d4422bfbbb 100644 --- a/ui-ngx/src/app/shared/components/value-input.component.ts +++ b/ui-ngx/src/app/shared/components/value-input.component.ts @@ -114,7 +114,7 @@ export class ValueInputComponent implements OnInit, ControlValueAccessor { } updateView() { - if (this.inputForm.valid || this.valueType === ValueType.BOOLEAN || this.valueType === ValueType.JSON) { + if (this.inputForm.valid || this.valueType === ValueType.BOOLEAN) { this.propagateChange(this.modelValue); } else { this.propagateChange(null); @@ -126,6 +126,7 @@ export class ValueInputComponent implements OnInit, ControlValueAccessor { this.modelValue = false; } else if (this.valueType === ValueType.JSON) { this.modelValue = {}; + this.inputForm.form.get('value').patchValue({}); } else { this.modelValue = null; }