Merge pull request #5305 from ArtemDzhereleiko/bug-fix/add-attribute/boolean

[3.3.2] UI: Fixed impossible to save new boolean attribute
This commit is contained in:
Igor Kulikov 2021-10-08 11:32:22 +03:00 committed by GitHub
commit 4e59f4a888
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -124,8 +124,9 @@ export class ValueInputComponent implements OnInit, ControlValueAccessor {
onValueTypeChanged() { onValueTypeChanged() {
if (this.valueType === ValueType.BOOLEAN) { if (this.valueType === ValueType.BOOLEAN) {
this.modelValue = false; this.modelValue = false;
} 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;
} }