@overmap-ai/forms 1.0.4 → 1.0.5-fix-category-edit-crash.0
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.
- package/dist/forms.js +4 -3
- package/dist/forms.js.map +1 -1
- package/dist/forms.umd.cjs +4 -3
- package/dist/forms.umd.cjs.map +1 -1
- package/package.json +1 -1
package/dist/forms.js
CHANGED
|
@@ -1475,10 +1475,11 @@ const initialFormValues = (fields, values) => {
|
|
|
1475
1475
|
if (field instanceof FieldSection) {
|
|
1476
1476
|
return { ...acc, ...initialFormValues(field.fields, values) };
|
|
1477
1477
|
}
|
|
1478
|
-
|
|
1479
|
-
|
|
1478
|
+
const copy = { ...acc };
|
|
1479
|
+
if (uncontrolledValues.includes(get(copy, field.getId()))) {
|
|
1480
|
+
set(copy, field.getId(), "");
|
|
1480
1481
|
}
|
|
1481
|
-
return
|
|
1482
|
+
return copy;
|
|
1482
1483
|
}, values);
|
|
1483
1484
|
};
|
|
1484
1485
|
const defaultHandleSubmit = () => {
|