From be355cc6b4520d919a7e5d2124e3a5af645c9e22 Mon Sep 17 00:00:00 2001 From: loictrichaud <8958727+loictrichaud@users.noreply.github.com> Date: Mon, 12 Apr 2021 12:58:51 +0200 Subject: [PATCH] add enableFractions in form values (#6915) --- lib/core/form/components/widgets/core/form-field.model.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/core/form/components/widgets/core/form-field.model.ts b/lib/core/form/components/widgets/core/form-field.model.ts index b6f0cc0b71..24b8e7b2b4 100644 --- a/lib/core/form/components/widgets/core/form-field.model.ts +++ b/lib/core/form/components/widgets/core/form-field.model.ts @@ -399,7 +399,7 @@ export class FormFieldModel extends FormWidgetModel { } break; case FormFieldTypes.NUMBER: - this.form.values[this.id] = parseInt(this.value, 10); + this.form.values[this.id] = this.enableFractions ? parseFloat(this.value) : parseInt(this.value, 10); break; case FormFieldTypes.AMOUNT: this.form.values[this.id] = this.enableFractions ? parseFloat(this.value) : parseInt(this.value, 10);