- fix for fields with value 0;
This commit is contained in:
@@ -152,6 +152,7 @@ const BandoApplication = () => {
|
||||
trigger();
|
||||
|
||||
const formValues = getValues();
|
||||
console.log('formValues', formValues);
|
||||
const usedFieldsIds = pluck('id', formData);
|
||||
const newFormValues = Object.keys(formValues)
|
||||
.filter(v => usedFieldsIds.includes(v))
|
||||
@@ -164,7 +165,7 @@ const BandoApplication = () => {
|
||||
fieldVal = tzAwareDate.toISOString().substring(0, 19);
|
||||
}
|
||||
|
||||
fieldVal = !fieldVal ? null : fieldVal;
|
||||
fieldVal = isEmpty(fieldVal) ? null : fieldVal;
|
||||
if (formField && formField.name === 'fileupload') {
|
||||
fieldVal = is(Array, fieldVal) ? fieldVal.map(o => o.id).join(',') : null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user