Skip to content

Releases: rjsf-team/react-jsonschema-form

6.0.0-beta.21

08 Oct 20:27

Choose a tag to compare

6.0.0-beta.21 Pre-release
Pre-release

New feature added

@rjsf/antd

  • Updated ArrayFieldTemplate, ObjectFieldTemplate, TitleField to add support for the new optionalDataControl feature
    • Added the new OptionalDataControlTemplate to the theme, adding it to the templates list
  • Updated the ButtonTemplates classes to fix up the props in AntdIconButtonProps and the IconButtons associated with them to better support the OptionalDataControlTemplate

@rjsf/chakra-ui

  • Updated ArrayFieldTemplate, ObjectFieldTemplate, TitleField to add support for the new optionalDataControl feature
    • Added the new OptionalDataControlTemplate to the theme, adding it to the templates list
  • Updated the ButtonTemplates classes to add ChakraIconButtonProps and the IconButtons associated with them to better support the OptionalDataControlTemplate

@rjsf/core

  • Added initialDefaultsGenerated flag to state, which indicates whether the initial generation of defaults has been completed
  • Added ObjectField tests for additionalProperties with defaults
  • Added a new OptionalDataControlsField to the fields that renders either undefined (when there is data for a readonly/disabled field) or gets the OptionalDataControlsTemplate and renders the label and potentially an onAddClick or onRemoveClick function
  • Updated ArrayField and ObjectField to check whether it shouldRenderOptionalData() and if true, calls ObjectDataControlsField and passes the result to its associated render template as optionalDataControl
  • Updated ArrayFieldTemplate, ObjectFieldTemplate, TitleField to add support for the new optionalDataControl feature
    • Added the new OptionalDataControlTemplate to the theme, adding it to the templates list
  • Updated Form as follows to fix #4796
    • Refactored the liveValidate() and mergeErrors() functions out of getStateFromProp() and processPendingChange()
    • Added new, optional customErrors?: ErrorSchemaBuilder<T> to the FormState, updating the IChangeEvent interface to remove all of the private variables
    • Reworked the newErrorSchema handling in processPendingChange() to simplify the handling since newErrorSchema is now path-specific, adding newErrorSchema to customErrors when they don't match an existing validator-based validation
      • This rework resulted in any custom errors passed from custom widgets/fields will now be remembered during the validation stage
    • Removed the now unused getPreviousCustomValidateErrors() and filterErrorsBasedOnSchema() methods
  • Updated LayoutGridField to simplify onFieldChange() to just return the given errorSchema now that it is path-specific, fixing #4796
  • Updated NullField to pass fieldPathId.path for the onChange() instead of [name]

@rjsf/daisyui

  • Updated ArrayFieldTemplate, ArrayFieldTitleTemplate, ObjectFieldTemplate, TitleField to add support for the new optionalDataControl feature
    • Added the new OptionalDataControlTemplate to the theme, adding it to the templates list
  • Updated the ButtonTemplates classes to better support the OptionalDataControlTemplate

@rjsf/fluentui-rc

  • Updated ArrayFieldTemplate, ObjectFieldTemplate, TitleField to add support for the new optionalDataControl feature
    • Added the new OptionalDataControlTemplate to the theme, adding it to the templates list
  • Updated the ButtonTemplates classes to add FluentIconButtonProps and the IconButtons associated with them to better support the OptionalDataControlTemplate

@rjsf/mantine

  • Updated ArrayFieldTemplate, ObjectFieldTemplate, TitleField to add support for the new optionalDataControl feature
    • Added the new OptionalDataControlTemplate to the theme, adding it to the templates list

@rjsf/mui

  • Updated ArrayFieldTemplate, ObjectFieldTemplate, TitleField to add support for the new optionalDataControl feature
    • Added the new OptionalDataControlTemplate to the theme, adding it to the templates list

@rjsf/primereact

  • Updated ArrayFieldTemplate, ObjectFieldTemplate, TitleField to add support for the new optionalDataControl feature
    • Added the new OptionalDataControlTemplate to the theme, adding it to the templates list
  • Updated the ButtonTemplates classes to add PrimeIconButtonProps and the IconButtons associated with them to better support the OptionalDataControlTemplate

@rjsf/react-bootstrap

  • Updated ArrayFieldTemplate, ObjectFieldTemplate, TitleField to add support for the new optionalDataControl feature
    • Added the new OptionalDataControlTemplate to the theme, adding it to the templates list
  • Updated the ButtonTemplates classes to add BootstrapIconButtonProps and the IconButtons associated with them to better support the OptionalDataControlTemplate

@rjsf/semantic-ui

  • Updated ArrayFieldTemplate, ObjectFieldTemplate, TitleField to add support for the new optionalDataControl feature
    • Added the new OptionalDataControlTemplate to the theme, adding it to the templates list
  • Updated the ButtonTemplates classes to add SemanticIconButtonProps and the IconButtons associated with them to better support the OptionalDataControlTemplate

@rjsf/shadcn

  • Updated ArrayFieldTemplate, ObjectFieldTemplate, TitleField to add support for the new optionalDataControl feature
    • Added the new OptionalDataControlTemplate to the theme, adding it to the templates list
  • Updated the ButtonTemplates classes to add ShadIconButtonProps and the IconButtons associated with them to better support the OptionalDataControlTemplate

@rjsf/utils

  • Updated getDefaultFormState to add a new initialDefaultsGenerated prop flag, along with type definitions, fixing uneditable & permanent defaults with additional properties 3759
  • Updated createSchemaUtils definition to reflect addition of initialDefaultsGenerated
  • Updated existing tests where getDefaultFormState is used to reflect addition of initialDefaultsGenerated
  • Updated types.ts to support the new Optional Data Controls feature as follows:
    • Added new OptionalDataControlsTemplateProps and refactored the common props from ArrayFieldTemplateProps and ObjectFieldTemplateProps into a new super type, ContainerFieldTemplateProps
    • Added new optionalDataControl?: ReactNode to the ArrayFieldTitleProps, TitleFieldProps and ContainerFieldTemplateProps
    • Updated GlobalFormOptions to add new enableOptionalDataFieldForType?: ('object' | 'array')[] prop
    • Updated SchemaUtilsType's retrieveSchema() function to add an additional, property resolveAnyOfOrOneOfRefs?: boolean
  • Updated the Templates interface to add a new required template OptionalDataControlsTemplate: ComponentType<OptionalDataControlsTemplateProps<T, S, F>>
  • Updated retrieveSchema() to add an additional property resolveAnyOfOrOneOfRefs?: boolean which causes resolveAllSchemas() to resolve $refs inside of the options of anyOf/oneOf schemas
  • Updated getDefaultFormState to fix an issue where optional array props had their default set to an empty array when they shouldn't be
  • Updated the TranslatableString enum to add three new strings in support of the new feature: OptionalObjectAdd, OptionalObjectRemove and OptionalObjectEmptyMsg
  • Added four new utility functions: isFormDataAvailable(), isRootSchema(), optionalControlsId(), and shouldRenderOptionalField()
  • Updated validationDataMerge() to add an additional, optional parameter preventDuplicates = false, that causes the mergeObjects() call to receive preventDuplicates instead of true

Dev / docs / playground

  • Updated docs for getDefaultFormState to reflect addition of the initialDefaultsGenerated prop
  • Updated utility-function.me docs to add documentation for the new functions and to update the validationDataMerge() function's new parameter
    • Also updated docs for retrieveSchema and SchemaUtilsType for the new prop
  • Updated uiSchema.md to add documentation for the new enableOptionalDataFieldForType prop
  • Updated the playground to add a new Optional Data Controls example
  • Updated the snapshot and jest tests for Form to test the new Optional Data Controls feature
  • Updated custom-widgets-fields.md to change the documentation around passing errors via onChange() to reflect the new reality
  • Updated the v6x upgrade guide.md to document the new feature, utility functions and changes to existing method parameters

6.0.0-beta.20

02 Oct 00:53

Choose a tag to compare

6.0.0-beta.20 Pre-release
Pre-release

Significant Breaking Changes in this release

In order to support future features and to improve performance, IdSchema was replaced with FieldPathId. See below

@rjsf/antd

  • BREAKING CHANGES - Updated all of the templates and widgets to change idSchema to fieldPathId or to remove the <T> off of the idGenerator functions

@rjsf/chakra-ui

  • BREAKING CHANGES - Updated all of the templates and widgets to change idSchema to fieldPathId or to remove the <T> off of the idGenerator functions

@rjsf/core

  • BREAKING CHANGES
    • Updated all of the fields, templates and widgets to change idSchema to fieldPathId or to remove the <T> off of the idGenerator functions
    • ObjectField and ArrayField to use toFieldPathId instead of toIdSchema() to generate the fieldPathIds of all its children
    • Updated the onChange handling of fields to make path required and either pass it straight through, or use the fieldPathId.path instead of using an empty array or appending path information
    • Updated Form to use toFieldPathId() to generate fieldPathId instead of idSchema, always providing the idPrefix and idSeparator in the globalFormOptions and make the path: FieldPathList required
    • Updated LayoutGridField to remove the IdSchema related code in favor of FieldPathId code
  • Also exported the getTestRegistry() function from the main index.ts to assist developers in creating registry object for tests
  • Updated all of the test to deal with the idSchema -> fieldPathId changes

@rjsf/daisyui

  • BREAKING CHANGES - Updated all of the templates and widgets to change idSchema to fieldPathId or to remove the <T> off of the idGenerator functions
  • Also fixed the FieldTemplate to extract the description element so that it was not spread onto the div, fixing the snapshots

@rjsf/fluent-ui

  • BREAKING CHANGES - Updated all of the templates and widgets to change idSchema to fieldPathId or to remove the <T> off of the idGenerator functions

@rjsf/mantine

  • BREAKING CHANGES - Updated all of the templates and widgets to change idSchema to fieldPathId or to remove the <T> off of the idGenerator functions

@rjsf/mui

  • BREAKING CHANGES - Updated all of the templates and widgets to change idSchema to fieldPathId or to remove the <T> off of the idGenerator functions

@rjsf/primereact

  • BREAKING CHANGES - Updated all of the templates and widgets to change idSchema to fieldPathId or to remove the <T> off of the idGenerator functions

@rjsf/react-bootstrap

  • BREAKING CHANGES - Updated all of the templates and widgets to change idSchema to fieldPathId or to remove the <T> off of the idGenerator functions

@rjsf/semantic-ui

  • BREAKING CHANGES - Updated all of the templates and widgets to change idSchema to fieldPathId or to remove the <T> off of the idGenerator functions

@rjsf/shadcn

  • BREAKING CHANGES - Updated all of the templates and widgets to change idSchema to fieldPathId or to remove the <T> off of the idGenerator functions

@rjsf/utils

  • Added new FieldPathList and FieldPathId types and DEFAULT_ID_PREFIX and DEFAULT_ID_SEPARATOR to constants.ts
  • Added the new toFieldPathId() function to generate FieldPathIds, exporting it from the library
  • Deprecated the ui:rootFieldId in the UiSchema since idPrefix does the same exact thing
  • BREAKING CHANGES
    • Removed the IdSchema type, replacing idSchema: IdSchema<T> in all types with fieldPathId: FieldPathId
    • Updated the idGenerators to replace id: IdSchema<T> | string with id: FieldPathId | string removing the need for the <T = any> generic on the functions
    • Removed the toIdSchema() function in the schema directory
    • Updated the FieldProps type's onChange() callback to make the path: FieldPathList parameter be required instead of optional
    • Updated the SchemaUtilsType and createSchemaUtils() to remove the toIdSchema() function

@rjsf/validator-ajv8

  • Updated the test to no longer try to test the delete toIdSchema function

Dev / docs / playground

  • Updated custom-templates.md, custom-widgets-fields.md and layout-grid.md to change the idSchema documentation to fieldPathId
  • Updated uiSchema.md to mark the ui:rootFieldId as deprecated in the documentation
  • Updated utility-functions.md delete toIdSchema(), add toFieldPathId() and to remove the <T> from the id generator functions
  • Updated v6.x upgrade guide.md to document all the breaking changes, new functions and deprecations made in 6.0.0-beta.20

6.0.0-beta.19

29 Sep 16:11

Choose a tag to compare

6.0.0-beta.19 Pre-release
Pre-release

@rjsf/core

  • Updated Form to fix live validation in getStateFromProps() broken by an optimization, fixing #4782
  • Updated Form to fix error messages being displayed abnormally when customValidate is provided, fixing #4783
  • Updated Form to fix omitExtraData when the leaf node happens to have an object value, fixing #4784

@rjsf/utils

  • Updated resolveSchema() to pass the experimental_customMergeAllOf options properly to resolveReference() and resolveDependencies() called within it

6.0.0-beta.18

21 Sep 05:43

Choose a tag to compare

6.0.0-beta.18 Pre-release
Pre-release

@rjsf/chakra-ui

  • Updated ObjectFieldTemplate to always generate the "Add" button when canExpand() is true, fixing #4772

@rjsf/core

  • Updated Form to add the globalFormOptions to the registry when there are GlobalFormOptions provided, also stopped passing idPrefix and idSeparator to SchemaField
  • Updated ArrayField, LayoutGridField, ObjectField and SchemaField to get idPrefix, idSeparator from the registry.globalFormOptions, no longer passing them on FieldProps
    • Updated SchemaField to get experimental_componentUpdateStrategy from the registry.globalFormOptions as well

@rjsf/utils

  • Update getDefaultFormState() to add support for null defaults for ["null", "object"] and ["null", "array"], fixing #1581
  • Added a new GlobalFormProps interface which contains the following props and replaced the experimental_componentUpdateStrategy in Registry with globalFormProps?: GlobalFormProps
    • experimental_componentUpdateStrategy (refactored from Registry) and idPrefix & idSeparator (refactored from FieldProps)
  • BREAKING CHANGE: Removed the optional idPrefix and idSeparator props from the FieldProps interface

Dev / docs / playground

  • Updated the custom-widget-fields.md and v6.x upgrade guide.md to document the refactor of the idPrefix and idSeparator refactor

6.0.0-beta.17

12 Sep 20:47

Choose a tag to compare

6.0.0-beta.17 Pre-release
Pre-release

@rjsf/core

  • Updated ObjectField to remove the name from the path passed to onChange() callback in handleAddClick() and onDropPropertyClick(), fixing #4763
  • Updated Form to restore the passing of an empty string for name to avoid accidentally showing it as the title for the whole schema

@rjsf/shadcn

  • Update ArrayFieldItemTemplate to align buttons with the input field, fixing #4753

6.0.0-beta.16

11 Sep 16:19

Choose a tag to compare

6.0.0-beta.16 Pre-release
Pre-release

@rjsf/antd

  • Updated the ArrayFieldTemplate, FieldTemplate and ObjectFieldTemplate to get formContext from the registry

@rjsf/core

  • Updated ArrayField, Form, LayoutMultiSchemaField and SchemaField to stop passing formContext

@rjsf/daisyui

  • Updated FieldTemplate to remove formContext as it is never used

@rjsf/semantic-ui

  • Updated the ArrayFieldTemplate, BaseInputTemplate, CheckboxWidget, FieldTemplate, RadioWidget, RangeSelect, SelectWidget, TextareaWidget and ObjectFieldTemplate to get formContext from the registry

@rjsf/utils

  • BREAKING CHANGE: Removed formContext from the following interfaces because it is available on registry:
    • ErrorListProps, FieldProps, FieldTemplateProps, ArrayFieldTemplateProps and WidgetProps
  • Update mergeDefaultsWithFormData to properly handle overriding undefined formData with a null default value, fixing #4734
  • Fixed object reference sharing in arrays with minItems when using oneOf schemas, fixing #4756
  • Updated getWigets() to output the schema when throwing errors, fixing #4731

Dev / docs / playground

  • Updated the documentation to remove formContext from the interface documentation, adding a BREAKING CHANGE notification in the v6.x upgrade guide
  • POTENTIAL BREAKING CHANGE: Updated the cjs build for all packages to generate .cjs files instead of .js files and updating the exports to make the require statements use .cjs, fixing [#4754]#4754)
  • Updated v6.x upgrade guide.md to note the change to the cjs builds

6.0.0-beta.15

27 Aug 19:56

Choose a tag to compare

6.0.0-beta.15 Pre-release
Pre-release

@rjsf/chakra-ui

  • Updated package.json for to make lucide-react a dependency rather than a devDependency, fixing #4739

@rjsf/core

  • Updated ArrayField onSelectChange to not pass name in the path since the ObjectField will automatically add it #4733
  • Updated Form to optimize the need for live validation in an attempt to improve performance, potentially fixing #3616

@rjsf/semantic-ui

  • Updated ArrayField to stop using nanoid and instead use lodash/uniqueId to fix #4762

@rjsf/shadcn

  • Update README.md with picture of the theme!
  • Allow passing className props to AddButton, BaseInputTemplate, CheckboxWidget, CheckboxesWidget, RadioWidget, SelectWidget, SubmitButton, TextareaWidget for extra Tailwind CSS customization through ui:className

@rjsf/utils

  • Updated getTestIds to stop using nanoid and instead use lodash/uniqueId to fix #4762

Dev / docs / playground

  • Removed nanoid from the build system and jest.config.js files

5.24.13

22 Aug 19:58
6ad8025

Choose a tag to compare

@rjsf/core

  • Updated ArrayField to stop using nanoid and instead use lodash/uniqueId to fix #4762

@rjsf/semantic-ui

  • Updated ArrayField to stop using nanoid and instead use lodash/uniqueId to fix #4762

Dev / docs / playground

  • Removed nanoid from the build system and jest.config.js files

6.0.0-beta.14

18 Aug 17:41

Choose a tag to compare

6.0.0-beta.14 Pre-release
Pre-release
  • A BREAKING CHANGE to the FieldProps.onChange callback function was made that COULD affect custom fields, depending on the implementation.

@rjsf/core

  • Added support for dynamic UI schema in array fields - the items property in uiSchema can now accept a function that returns a UI schema based on the array item's data, index, and form context (#4706)
  • Fixed checkbox widget to use current value instead of event target in onFocus/onBlur handlers, fixing #4704
  • Updated all of the XxxxField components and Form to handle the new path parameter in FieldProps.onChange, making Form queue up changes so that they are all processed and no data is lost, fixing #3367
  • Updated a bug in AltDateWidget related to the clear button not working after the fix for #3367
  • Fixed the missing hook dependencies for the CheckboxesWidget so that they work properly

@rjsf/chakra-ui

  • Fixed checkbox widget to use current value instead of event target in onFocus/onBlur handlers, fixing #4704

@rjsf/daisyui

  • Fixed checkbox widget to use current value instead of event target in onFocus/onBlur handlers, fixing #4704
  • Fixed additional properties rendering by properly connecting the FieldTemplate and WrapIfAdditionalTemplate, fixing 4707
  • Fixed the missing hook dependencies in the DateTimeWidget and DateWidget so that they work properly

@rjsf/fluentui-rc

  • Fixed checkbox widget to use current value instead of event target in onFocus/onBlur handlers, fixing #4704

@rjsf/mantine

  • Added new theme!

@rjsf/mui

  • Fixed checkbox widget to use current value instead of event target in onFocus/onBlur handlers, fixing #4704

@rjsf/primereact

  • Fixed checkbox widget to use current value instead of event target in onFocus/onBlur handlers, fixing #4704

@rjsf/semantic-ui

  • Fixed checkbox widget to use current value instead of event target in onFocus/onBlur handlers, fixing #4704

@rjsf/shadcn

  • Bump @shadcn/ui components to use latest version from https://ui.shadcn.com/
  • Bump tailwindcss to using v4 and css compiling process to use latest @tailwindcss/cli
  • Remove postcss due to new Oxide compiler of tailwindcss
  • Update playground themes with default, Amethyst Haze, Caffeine, Claude, Neo Brutalism, Pastel Dreams, Soft Pop, Twitter, Vercel
  • Radio widget labels are now accessible and can be clicked on to select the associated option.

@rjsf/utils

  • Updated UiSchema type to support dynamic array item UI schemas - the items property can now be either a UiSchema object or a function that returns a UiSchema (#4706)
  • Added title property to RJSFValidationError PR
  • BREAKING CHANGE: Updated the FieldProps interface's onChange handler to inject a new optional path before the ErrorSchema parameter as part of the fix for #3367

@rjsf/validator-ajv8

  • Updated transformRJSFValidationErrors() to include the title property of a field with error fixing #4504 with PR
  • Updated AJVValidator to handle the attempted compile of a bad schema, fixing #4357

Dev / docs / playground

  • Added comprehensive documentation for dynamic UI schema feature with TypeScript examples #4706
  • Updated array documentation to reference the new dynamic UI schema capabilities #4706
  • Updated nearly all of the libraries in the package.json files to the latest non-breaking versions
  • Fixed the broken Custom Array sample
  • Improved the Any Of with Custom Field sample so that it renders using the appropriate theme components
  • Updated the custom-widgets-fields.md and v6.x upgrade guide.md to document the BREAKING CHANGE to the FieldProps.onChange behavior
  • Updated the playground to properly output the validationError when running Raw Validate

6.0.0-beta.13

12 Aug 18:13

Choose a tag to compare

6.0.0-beta.13 Pre-release
Pre-release

@rjsf/shadcn

  • Updated lodash import in fancy-multi-select.tsx to to be direct import, fixing #4696

6.0.0-beta.13

@rjsf/core

  • Added experimental_componentUpdateStrategy prop to Form component to control re-render optimization behavior. Supports 'customDeep' (default, uses deep equality checks that ignore functions), 'shallow', and 'always'

@rjsf/utils

  • Extended Registry interface to include optional experimental_componentUpdateStrategy property
  • Added shallowEquals() utility function for shallow equality comparisons
  • Fixed boolean fields incorrectly set to {} when switching oneOf/anyOf options with mergeDefaultsIntoFormData set to useDefaultIfFormDataUndefined, fixing #4709 (#4710)
  • Always make all references absolute in nested bundled schemas