[ADF-4790] [ADF-4791] - fix visibility condition for text/checkbox and variable/value (#4978)

* [ADF-4790] [ADF-4791] - fix visibility condition for empty string and checkbox - value/variable

* reset package-lock

* reset package-lock.json

* fix lint and change return type
This commit is contained in:
Silviu Popa
2019-08-09 00:51:10 +03:00
committed by Eugenio Romano
parent f04c135377
commit cb988b0145
4 changed files with 201 additions and 17 deletions

View File

@@ -413,6 +413,9 @@ export class FormFieldModel extends FormWidgetModel {
case FormFieldTypes.AMOUNT:
this.form.values[this.id] = this.enableFractions ? parseFloat(this.value) : parseInt(this.value, 10);
break;
case FormFieldTypes.BOOLEAN:
this.form.values[this.id] = (this.value !== null && this.value !== undefined) ? this.value : false;
break;
default:
if (!FormFieldTypes.isReadOnlyType(this.type) && !this.isInvalidFieldType(this.type)) {
this.form.values[this.id] = this.value;