Skip to content

Releases: rjsf-team/react-jsonschema-form

5.13.3

30 Oct 19:43
Compare
Choose a tag to compare

@rjsf/antd

  • Fixed the SelectWidget so that filtering works by reworking how options are passed to the underlying Select

@rjsf/core

  • Replaced the deprecated UNSAFE_componentWillReceiveProps() method in the Form.tsx component with an improved solution utilizing the React lifecycle methods: getSnapshotBeforeUpdate() and componentDidUpdate(). Fixing #1794
  • Fixed the ArrayField implementation to never pass an undefined schema for fixed arrays to other methods, fixing #3924
  • Fixed a refresh issue in getSnapshotBeforeUpdate() caused by the fix for #1794, fixing #3927

@rjsf/utils

  • Updated toPathSchemaInternal() util to generate correct path schemas for fixed arrays by picking up individual schemas in the items array, fixing #3909

5.13.2

12 Oct 21:43
Compare
Choose a tag to compare

@rjsf/utils

  • Updated resolveAnyOrOneOfSchemas() to not take a recurseList anymore, and instead always pass an empty array down to resolveAllReferences(), fixing #3902
    • Also updated parseSchema() and resolveDependencies() to no longer pass recurseList to resolveAnyOrOneOfSchemas()

@rjsf/validator-ajv8

  • Updated AJV8PrecompiledValidator to add a new ensureSameRootSchema() function that is called in both rawValidation() and isValid()
    • This function adds an optimization to avoid resolving the root schema unless necessary

5.13.1

11 Oct 18:14
Compare
Choose a tag to compare

@rjsf/core

  • Updated ArrayField to move errors in the errorSchema when the position of array items changes for the insert and copy cases.

@rjsf/material-ui

  • Removed an unnecessary Grid container component in the ArrayFieldTemplate component that wrapped the ArrayFieldItemTemplate, fixing #3863
  • Fixed an issue where SelectWidget switches from controlled to uncontrolled when enumOptions does not include a value, fixing #3844

@rjsf/mui

  • Removed an unnecessary Grid container component in the ArrayFieldTemplate component that wrapped the ArrayFieldItemTemplate, fixing #3863
  • Fixed an issue where SelectWidget switches from controlled to uncontrolled when enumOptions does not include a value, fixing #3844

@rjsf/utils

  • Added getOptionMatchingSimpleDiscriminator() function
  • getMatchingOption and getClosestMatchingOption now bypass validator.isValid() calls when simple discriminator is provided, fixing #3692
  • Fix data type in FieldTemplateProps['onChange']
  • Updated retrieveSchema() to properly resolve references inside of properties and array items while also dealing with recursive $refs, fixing #3761
    • Updated schemaParser() and getClosestMatchingOption() to pass the new recursiveRef parameter added to internal retrieveSchema() APIs
  • Added/updated all the necessary tests to restore the 100% test coverage that was lost when updating to Jest 29
    • Updated getDefaultFormState() to remove an unnecessary check for formData being an object since it is always guaranteed to be one, thereby allowing full testing coverage
  • Updated getSchemaType() to return the first schema type when it is an array not containing 'null', fixing #3875

@rjsf/validator-ajv8

  • Updated the validator and precompiledValidator tests to the restore 100% coverage that was lost when updating to Jest 29
    • Updated isValid() for the validator commenting out an if condition that was preventing 100% coverage, with a TODO to fix it later

Dev / docs / playground

  • Added the @types/jest as a global devDependency so that developer tools properly recognize the jest function types

5.13.0

08 Sep 17:08
Compare
Choose a tag to compare

@rjsf/antd

  • Bump Antd version from v4 to v5.
  • Intentionally kept peer dependencies to v4 so that this change doesn't make breaking change for @rjfs/antd users.
  • However, if users of @rjsf/antd want to use v5 styling, they need to wrap your application with the StyleProvider from @ant-design/cssinjs. They need not have to install this package, its a transitive package coming from antd.
import { StyleProvider  } from '@ant-design/cssinjs';

const Component = () => {
return (<StyleProvider><YourFormComponents /></StyleProvider>);
}

@rjsf/core

  • Updated MultiSchemaField to only merge top level required field fixing duplicate field and description.
  • Fixed programmatic validation (validateForm()) removes previous errors if all data is now valid.

@rjsf/chakra-ui

  • Fixed a faulty check of the isMultiple option in MultiSchemaField. It no longer offers multiple choice inside a select field in a oneOf case in Chakra UI, fixing #3848

5.12.1

18 Aug 16:13
de64777
Compare
Choose a tag to compare

5.12.1

@rjsf/validator-ajv8

  • Updated AJV8PrecompiledValidator.rawValidation() to resolve root schema with formData when comparing input schema, fixing #3825

@rjsf/core

  • Updated MultiSchemaField to merge all top level fields except properties for anyOf/oneOf options, fixing #3808 and #3787

@rjsf/antd

  • Updated CheckboxesWidget to not show duplicate title, fixing #3815

@rjsf/utils

  • Updated retrieveSchemaInternal allOf logic for precompiled schemas to resolve top level properties fixing #3817

5.12.0

09 Aug 18:06
Compare
Choose a tag to compare

New features

@rjsf/utils

  • Experimental feature:
    • Added experimental_defaultFormStateBehavior = { arrayMinItems: { populate: 'never' } } (feature #3796)

@rjsf/validator-ajv8

  • Exposing new function compileSchemaValidatorsCode to allow creating precompiled validator without a file. This is useful in case when precompiled validator is to be created dynamically. #3793

Dev / docs / playground

  • update playground vite config to use sources directly, allowing to reload changes in it without additional build step
  • moving from dts-cli to use individual dev tools directly, updating package publish config
    • tsc for generating type definitions and esm modules
    • esbuild for CJS bundle
    • rollup for UMD bundle
  • Updated the form-props documentation arrayMinItems, added description for never.
  • Updated the playground to add the option for the new arrayMinItems.populate = 'never'.

5.11.2

02 Aug 20:57
Compare
Choose a tag to compare

@rjsf/material-ui

  • Removed unnecessary import of old @types/material-ui which can cause typescript issues in some situations

@rjsf/utils

  • Updated the resolveAllReferences() function to use object spreading to update properties and items in a schema rather than directly modifying the schema to avoid issues with frozen object, fixing #3805

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