You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Do not omit nested additionalProperties (rjsf-team#1774)
Fix bug where additional properties are not submitted when nested and omit data enabled Fixesrjsf-team#1497 Co-authored-by: Ashwin Ramaswami <aramaswamis@gmail.com>
it("should get field marked as additionalProperties",()=>{
2819
+
constschema={};
2820
+
2821
+
constformData={
2822
+
extra: {
2823
+
foo: "bar",
2824
+
},
2825
+
level1: {
2826
+
level2: "test",
2827
+
extra: "foo",
2828
+
mixedMap: {
2829
+
namedField: "foo",
2830
+
key1: "val1",
2831
+
},
2832
+
},
2833
+
level1a: 1.23,
2834
+
};
2835
+
2836
+
constonSubmit=sandbox.spy();
2837
+
const{ comp }=createFormComponent({
2838
+
schema,
2839
+
formData,
2840
+
onSubmit,
2841
+
});
2842
+
2843
+
constpathSchema={
2844
+
$name: "",
2845
+
level1: {
2846
+
$name: "level1",
2847
+
level2: {$name: "level1.level2"},
2848
+
mixedMap: {
2849
+
$name: "level1.mixedMap",
2850
+
__rjsf_additionalProperties: true,
2851
+
namedField: {$name: "level1.mixedMap.namedField"},// this name should not be returned, as the root object paths should be returned for objects marked with additionalProperties
0 commit comments