github rjsf-team/react-jsonschema-form v5.9.0
5.9.0

latest releases: 5.21.1, v5.21.1, 5.21.0...
14 months ago

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

Don't miss a new react-jsonschema-form release

NewReleases is sending notifications on new releases.