kwikid-forms 0.2.11 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -3092,8 +3092,8 @@
|
|
|
3092
3092
|
_loop_1 = function (field) {
|
|
3093
3093
|
var _r, _s;
|
|
3094
3094
|
if (field.isFormElement) {
|
|
3095
|
-
this_1.previousFormData = Object.assign(Object.assign({}, this_1.previousFormData), (_r = {}, _r[field.key] = this_1.formGroup.controls[field.key].value, _r));
|
|
3096
|
-
this_1.formData = Object.assign(Object.assign({}, this_1.formData), (_s = {}, _s[field.key] = this_1.formGroup.controls[field.key].value, _s));
|
|
3095
|
+
this_1.previousFormData = Object.assign(Object.assign({}, this_1.previousFormData), (_r = {}, _r[field.key] = convertFormFieldValueToStandardFormat(field, this_1.formGroup.controls[field.key].value), _r));
|
|
3096
|
+
this_1.formData = Object.assign(Object.assign({}, this_1.formData), (_s = {}, _s[field.key] = convertFormFieldValueToStandardFormat(field, this_1.formGroup.controls[field.key].value), _s));
|
|
3097
3097
|
this_1.formGroup.controls[field.key].valueChanges
|
|
3098
3098
|
.pipe(operators.pairwise())
|
|
3099
3099
|
.subscribe(function (_h) {
|
|
@@ -3989,7 +3989,11 @@
|
|
|
3989
3989
|
else {
|
|
3990
3990
|
var formDataInKwikUIFormat = {};
|
|
3991
3991
|
for (var fieldKey in formData) {
|
|
3992
|
-
|
|
3992
|
+
var field = getFormFieldByKey(this.formFields, fieldKey);
|
|
3993
|
+
if (!kwikidToolkit.isUndefined(field) && !kwikidToolkit.isNull(field)) {
|
|
3994
|
+
formDataInKwikUIFormat[fieldKey] =
|
|
3995
|
+
convertFormFieldValueToKwikUIFormat(field, formData[fieldKey]);
|
|
3996
|
+
}
|
|
3993
3997
|
}
|
|
3994
3998
|
this.formGroup.patchValue(formDataInKwikUIFormat, { emitEvent: false });
|
|
3995
3999
|
}
|