Skip to content

Commit

Permalink
fix(form): Correct cascader schema definition to avoid overwrite.
Browse files Browse the repository at this point in the history
  • Loading branch information
vinci1it2000 committed Jan 12, 2025
1 parent 3f4d26e commit c023b34
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions schedula/utils/form/react/src/core/components/toPathSchema.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import get from 'lodash/get';
import set from 'lodash/set';
import defaultsDeep from 'lodash/defaultsDeep';
import cloneDeep from 'lodash/cloneDeep';
import has from "lodash/has"
import isEqual from "lodash/isEqual"

Expand Down Expand Up @@ -179,12 +180,13 @@ function toPathSchemaInternal(
})
return {
schema: s,
properties: defaultsDeep(properties, s.properties)
properties: defaultsDeep({}, properties, get(s, 'properties', {}))
}
}, {schema, properties: schema.properties})
} else {
_schema = {properties: schema.properties};
}
delete _schema.schema

pathSchema = {
...pathSchema,
Expand All @@ -194,7 +196,8 @@ function toPathSchemaInternal(
name,
rootSchema,
formData,
_recurseList
_recurseList,
experimental_customMergeAllOf
)
}
} else if (ONE_OF_KEY in schema || ANY_OF_KEY in schema) {
Expand Down

0 comments on commit c023b34

Please sign in to comment.