Skip to content

Commit

Permalink
update changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
Abdallah Al-Soqatri committed Aug 23, 2024
1 parent b1a7903 commit 47d9853
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ should change the heading of the (upcoming) version to include a major version b

- Updated the peer dependencies to `5.20.x` due to types and API changes in `@rjsf/utils`

## @rjsf/utils

- Fixes an issue with dependencies computeDefaults to ensure we can get the dependencies defaults [#4271](https://github.com/rjsf-team/react-jsonschema-form/issues/4271)

# 5.20.0

## @rjsf/core
Expand Down
2 changes: 1 addition & 1 deletion packages/utils/src/schema/getDefaultFormState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ export function computeDefaults<T = any, S extends StrictRJSFSchema = RJSFSchema
schemaToCompute = findSchemaDefinition<S>(refName, rootSchema);
}
} else if (DEPENDENCIES_KEY in schema) {
// Get the default if set from properties to ensure the dependency conditions are resolved based on it
// Get the default if set from properties to ensure the dependencies conditions are resolved based on it
const defaultFormData: T = { ...formData, ...getDefaultBasedOnSchemaType() };
const resolvedSchema = resolveDependencies<T, S, F>(validator, schema, rootSchema, false, [], defaultFormData);
schemaToCompute = resolvedSchema[0]; // pick the first element from resolve dependencies
Expand Down

0 comments on commit 47d9853

Please sign in to comment.