@rjsf/core 5.0.0-beta.13 → 5.0.0-beta.14
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/core.cjs.development.js +4 -3
- package/dist/core.cjs.development.js.map +1 -1
- package/dist/core.cjs.production.min.js +1 -1
- package/dist/core.cjs.production.min.js.map +1 -1
- package/dist/core.esm.js +4 -3
- package/dist/core.esm.js.map +1 -1
- package/dist/core.umd.development.js +4 -3
- package/dist/core.umd.development.js.map +1 -1
- package/dist/core.umd.production.min.js +1 -1
- package/dist/core.umd.production.min.js.map +1 -1
- package/dist/index.d.ts +3 -1
- package/package.json +5 -5
|
@@ -903,8 +903,9 @@ class AnyOfField extends React.Component {
|
|
|
903
903
|
}
|
|
904
904
|
}
|
|
905
905
|
}
|
|
906
|
-
// Call getDefaultFormState to make sure defaults are populated on change.
|
|
907
|
-
|
|
906
|
+
// Call getDefaultFormState to make sure defaults are populated on change. Pass "excludeObjectChildren"
|
|
907
|
+
// so that only the root objects themselves are created without adding undefined children properties
|
|
908
|
+
onChange(schemaUtils.getDefaultFormState(options[selectedOption], newFormData, "excludeObjectChildren"), undefined, this.getFieldId());
|
|
908
909
|
this.setState({
|
|
909
910
|
selectedOption: parseInt(option, 10)
|
|
910
911
|
});
|
|
@@ -3435,7 +3436,7 @@ class Form extends React.Component {
|
|
|
3435
3436
|
schemaValidationErrorSchema
|
|
3436
3437
|
};
|
|
3437
3438
|
} else if (!noValidate && newErrorSchema) {
|
|
3438
|
-
const errorSchema = extraErrors ? utils.mergeObjects(newErrorSchema, extraErrors,
|
|
3439
|
+
const errorSchema = extraErrors ? utils.mergeObjects(newErrorSchema, extraErrors, "preventDuplicates") : newErrorSchema;
|
|
3439
3440
|
state = {
|
|
3440
3441
|
formData: newFormData,
|
|
3441
3442
|
errorSchema: errorSchema,
|