Update json value for correct working
This commit is contained in:
parent
c893d5d221
commit
571d4f0dbd
@ -114,7 +114,7 @@ export class ValueInputComponent implements OnInit, ControlValueAccessor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
updateView() {
|
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);
|
this.propagateChange(this.modelValue);
|
||||||
} else {
|
} else {
|
||||||
this.propagateChange(null);
|
this.propagateChange(null);
|
||||||
@ -126,6 +126,7 @@ export class ValueInputComponent implements OnInit, ControlValueAccessor {
|
|||||||
this.modelValue = false;
|
this.modelValue = false;
|
||||||
} else if (this.valueType === ValueType.JSON) {
|
} else if (this.valueType === ValueType.JSON) {
|
||||||
this.modelValue = {};
|
this.modelValue = {};
|
||||||
|
this.inputForm.form.get('value').patchValue({});
|
||||||
} else {
|
} else {
|
||||||
this.modelValue = null;
|
this.modelValue = null;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user