Skip to content

Releases: rjsf-team/react-jsonschema-form

5.11.1

01 Aug 21:27
Compare
Choose a tag to compare

@rjsf/core

  • Updated SchemaField to ignore errors for anyOf/oneOf parent schema, fixing 1295

@rjsf/utils

  • Created new resolveAllReferences() function to resolve all references within a schema's properties and array items.
  • Updated getClosestMatchingOption() to use resolveAllReferences() for all oneOf/anyOf schemas
  • Updated resolveAnyOrOneOfSchemas() to use resolveAllReferences() for all oneOf/anyOf schemas
  • Better handle the null case in withIdRefPrefix, fixing #3792

5.11.0

21 Jul 16:32
Compare
Choose a tag to compare

NOTE: this release failed to publish.

New feature

@rjsf/core

  • Updated MultiSchemaField to use mergeSchema() for merging in the remaining schema for anyOf/oneOf
  • Added new extraErrorsBlockSubmit prop to Form that allows the extra asynchronous errors to block a form submit, fixing #3757

@rjsf/utils

  • Updated retrieveSchemaInternal() to always resolve allOf schema without merging when expandAllBranches is set, fixing compiled schema issue always throwing error with mergeAllOf
  • Updated getDefaultFormState() to use mergeSchema() for merging in the remaining schema for anyOf/oneOf
  • Updated retrieveSchema() to use mergeSchema() for merging in the remaining schema for anyOf/oneOf

Dev / docs / playground

  • Switched to using npm workspaces for the sub-package hierarchy
    • NOTE: Developers may need to run the npm run refresh-node-modules script first to get the build and tests to work correctly
  • Backfilled Docusaurus site with documentation for v3, v4

5.10.0

13 Jul 21:10
Compare
Choose a tag to compare

@rjsf/core

  • Updated getFieldComponent() to support rendering a custom component by given schema id ($id). #3740
  • Updated MultiSchemaField to merge the selected oneOf/anyOf value into base schema, fixing #3744

@rjsf/utils

  • Updated getClosestMatchingOption() to resolve refs in options before computing the closest matching option, fixing an issue with using precompiled validators
    • Also, added support for nested anyOf and discriminator support in the recursive calculateIndexScore()
  • Updated getDefaultFormState() to merge the remaining schema into anyOf/oneOf schema selected during the computation of values, fixing #3744
  • Updated retrieveSchema() to merge the remaining schema into the anyOf/oneOf schema selected during the resolving of dependencies, fixing #3744

Dev / docs / playground

  • Updated the custom-widgets-fields documentation to add the new added behaviour of getFieldComponent() function. #3740
  • Updated the playground to add an example of the new added behaviour of getFieldComponent() function. #3740

5.9.0

28 Jun 23:14
Compare
Choose a tag to compare

New utility function features

  • Added new capability to the mergeDefaultWithFormData() utility function (see below)
  • Added new experimental_defaultFormStateBehavior.arrayMinItems.mergeExtraDefaults flag which caused a breaking change to the experimental arrayMinItems feature (see below):
    • If you were previously passing experimental_defaultFormStateBehavior as { arrayMinItems = 'requiredOnly } on the Form, now you would pass { arrayMinItems: { populate: 'requiredOnly' } }

@rjsf/utils

  • Updated getDefaultFormState() to fix a bug where experimental_defaultFormStateBehavior: { emptyObjectFields: 'populateRequiredDefaults' } wasn't working for object properties with $refs
  • Experimental feature breaking change:
    • Updated the experimental_defaultFormStateBehavior.arrayMinItems from simple flag to an object containing two optional fields, populate and mergeExtraDefaults
      • The new arrayMinItems.mergeExtraDefaults flag, when "true", allows users to merge defaults onto the end of formData arrays when minItems is specified
  • Added a new, optional mergeExtraArrayDefaults=false flag to the mergeDefaultWithFormData() utility function to support the new arrayMinItems.mergeExtraDefaults experimental feature

Dev / docs / playground

  • Updated the utility-functions documentation to add the new mergeExtraArrayDefaults flag for the mergeDefaultWithFormData() function
  • Updated the form-props documentation to update the arrayMinItems documentation for the new object behavior
  • Updated the playground to add a checkbox for the new arrayMinItems.mergeExtraDefaults flag

5.8.2

20 Jun 17:26
Compare
Choose a tag to compare

@rjsf/validator-ajv8

  • Explicitly cache schemas by their hash when checking data is valid to avoid multiple compilations for schemas without IDs leading to poor performance #3721

5.8.1

06 Jun 21:15
Compare
Choose a tag to compare

Dev / docs / playground

  • Updated peer dependencies in all packages to ^5.8.x

5.8.0

06 Jun 00:34
Compare
Choose a tag to compare

New feature

  • Optional support for Markdown in descriptions

@rjsf/bootstrap-4

  • Updated FieldTemplate Component to display description from SchemaField and make it consistent for all the available themes

@rjsf/chakra-ui

  • Updated FieldTemplate Component to display description from SchemaField and make it consistent for all the available themes

@rjsf/core

  • Updated SchemaField to be able to render markdown in the description field
  • Updated MultiSchemaField.getMatchingOption to use option index from getClosestMatchingOption, fixing #3693 and
    #3705

@rjsf/fluent-ui

  • Updated FieldTemplate Component to display description from SchemaField and make it consistent for all the available themes

@rjsf/material-ui

  • Updated FieldTemplate Component to display description from SchemaField and make it consistent for all the available themes

@rjsf/mui

  • Updated FieldTemplate Component to display description from SchemaField and make it consistent for all the available themes

@rjsf/semantic-ui

  • Updated FieldTemplate Component to display description from SchemaField and make it consistent for all the available themes

@rjsf/utils

  • Updated getClosestMatchingOption to return selected option if all options score the same, fixing #3693 and #3705
  • Updated resolveCondition to default formData as empty object when evaluating if expression, fixing #3706
  • Updated retrieveSchemaInternal to return failed merged allOf sub schemas for expandAllBranches flag, fixing #3689
  • Updated hashForSchema to sort schema fields in consistent order before stringify to prevent different hash ids for the same schema
  • Updated enumOptionsSelectValue to allow picking falsy enumOptions, fixing #3716

@rjsf/validator-ajv8

  • Updated AJV8PrecompiledValidator.rawValidation() to use resolve root schema when comparing input schema, fixing #3708

Dev / docs / playground

  • Updated sample data and documentation about the markdown in RJSFSchema description
  • Fixed broken playground examples (#3696)
  • Added experimental_defaultFormStateBehavior.emptyObjectFields control to Playground
  • Fixed bug where subthemes would not appear in Playground

5.7.3

25 May 18:01
Compare
Choose a tag to compare

@rjsf/utils

  • Updated getClosestMatchingOption JUNK_OPTION schema with a well known $id
  • Updated schemaParser to resolve array items field, fixing #3689

@rjsf/validator-ajv8

  • Updated AJV8PrecompiledValidator.isValid() to return false for junk schema option, fixing #3677

5.7.2

16 May 06:55
Compare
Choose a tag to compare

@rjsf/validator-ajv8

  • Removed the importing of internal ajv types by simplifying the CompiledValidateFunction type to avoid a bunch of Typescript errors encountered by users of the package

5.7.1

16 May 00:01
Compare
Choose a tag to compare

@rjsf/core

  • Added protection against a null field in the focusOnError method in Form

@rjsf/validator-ajv8

  • Updated the build for all but the cjs development version, to not export the compileSchemaValidators() function to avoid "Module not found: Can't resolve 'fs' error" issues, fixing #3668

Dev / docs / playground

  • Updated the validation documentation to add a note with a web-resource to help folks work around the "Module not found: Can't resolve 'fs' error" issue for development environments
  • Updated all of the package-lock.json files to bump peer-dependencies to 5.7.x, fixing #3669