Releases: rjsf-team/react-jsonschema-form
Releases · rjsf-team/react-jsonschema-form
6.1.2
@rjsf/antd
- Updated
SelectWidgetto add a staticgetPopupContainerCallbackto theSelectWidgetcomponent, partially fixing #3609- Also, added the explicit
openstate to theSelectin conjunction with providing thesetOpenas theonOpenChangeprop
- Also, added the explicit
- In
BaseInputTemplateadded comments explaining whystep='1'is returned, closing #4022
@rjsf/mantine
- Align Mantine’s behavior with other themes when clearing string fields: clearing an input now removes the key from formData instead of setting it to an empty string. (#4875)
@rjsf/utils
- Replace json-schema-merge-allof with @x0k/json-schema-merge (#4774)
@rjsf/validator-ajv8
- Updated
CustomValidatorOptionsTypeto add newextenderFn?: (ajv: Ajv) => Ajvprop - Updated
createAjvInstance()to add newextenderFn?: (ajv: Ajv) => Ajvparameter, using it to extend theajvinstance, fixing #4746- Updated the
AJV8ValidatorandcompileSchemaValidatorsCode()to passextenderFnfrom theoptionsintocreateAjvInstance()
- Updated the
- Updated
transformRJSFValidationErrors()to add filtering of duplicateanyOf/oneOfbased errors from the returned errors, fixing #4167
Dev / docs / playground
- Updated
DemoFrameas follows to fix #3609- Override
antd'sSelectWidget.getPopupContainerCallbackcallback function to return undefined - Added a
AntdSelectPatchercomponent that observes the creation ofantdselect dropdowns and makes sure they open in the correct location - Update the
antdtheme wrapper to render theAntdSelectPatcher,AntdStyleProviderandConfigProviderwith it's owngetPopupContainer()function inside of aFrameContextConsumer
- Override
- Updated the base TypeScript configuration to use
"moduleResolution": "bundler" - Updated the
validation.mddocumentation to note that HTML 5 validation is not translatable via RJSF translation mechanisms and should be turned off, fixing #4092- Also added documentation for the new
extenderFnprop onCustomValidatorOptionsType
- Also added documentation for the new
6.1.1
@rjsf/core
- Updated
ObjectFieldto get errors and formData by wrappingnamein brackets to prevent names that have dots in them incorrectly getting data from a lower level, fixing #3846
@rjsf/shadcn
- Updated
package.jsonto copy css files to newresourcesdirectory
Dev / docs / playground
- Updated the
playgroundto use the css files for@rjsf/shadcnfrom the CDN connected with github, pointing to the new resources directory - Added new
antdIconsReplacer.tsand used it in@rjsf/antdduring build time to append.jsonto imports of@antd/iconsto fix es build issues on webpack and vite
6.1.0
@rjsf/antd
- Added support for rendering
ui:helpas markdown via newui:enableMarkdownInHelpflag inFieldHelpTemplate - Updated
ArrayFieldItemTemplateandArrayFieldTemplateto adjust sizes and buttons location usingdisplayLabelandhasDescription, fixing #3296 - Updated
FieldTemplate,ObjectFieldTemplateandWrapIfAdditionalTemplateto adjust the sizes and buttons location usingdisplayLabel
@rjsf/chakra-ui
- Added support for rendering
ui:helpas markdown via newui:enableMarkdownInHelpflag inFieldHelpTemplate - Updated
FieldTemplateandWrapIfAdditionalTemplateto adjust the sizes and buttons location usingdisplayLabelandrawDescription
@rjsf/core
- Added new
RichHelpcomponent for use in all the themes for help rendering, fixing #4601 - Updated
ArrayFieldto compute and passdisplayLabelandhasDescriptionto the renderedArrayFieldItemTemplateto support fixing #3296 - Updated
StringFieldto extract thetitlefrom the props and pass it down to the widget if provided - Updated
ArrayFieldItemTemplateto adjust buttons location usingdisplayLabelandhasDescription, fixing #3296 - Updated
AddButtonto improve it's responsiveness in relation to theArrayFieldItemTemplatechanges - Updated
WrapIfAdditionalTemplateto adjust the sizes and buttons location usingdisplayLabelandrawDescription
@rjsf/daisyui
- Added support for rendering
ui:helpas markdown via newui:enableMarkdownInHelpflag inFieldHelpTemplate - Updated
ArrayFieldItemTemplateto adjust buttons location usingdisplayLabelandhasDescription, fixing #3296 - Updated
WrapIfAdditionalTemplateto addflexGrowandBaseInputTemplateto addw-fullto allow the array item fields to grow properly - Updated
FieldTemplateto render thedescriptionwhich was missing in the theme - Updated
FieldTemplateandWrapIfAdditionalTemplateto adjust the sizes and buttons location usingdisplayLabelandrawDescription
@rjsf/fluentui-rc
- Added support for rendering
ui:helpas markdown via newui:enableMarkdownInHelpflag inFieldHelpTemplate - Updated
ArrayFieldItemTemplateto adjust buttons location usingdisplayLabel, fixing #3296 - Updated
WrapIfAdditionalTemplateto addflexGrowto allow the array item fields to grow properly for non-container elements - Updated
FieldTemplateandWrapIfAdditionalTemplateto adjust the sizes and buttons location usingdisplayLabelandrawDescription
@rjsf/mantine
- Added support for rendering
ui:helpas markdown via newui:enableMarkdownInHelpflag inFieldHelpTemplate - Updated
utils.tsto addlabelto the cleanup fields to filter it from theuiOptions - Updated
BaseInputTemplateto displaydescriptionwhich was missing in the theme - Updated
ArrayFieldTitleTemplateto support theoptionalData - Updated
FieldTemplateandWrapIfAdditionalTemplateto adjust the sizes and buttons location usingdisplayLabelandrawDescription
@rjsf/mui
- Added support for rendering
ui:helpas markdown via newui:enableMarkdownInHelpflag inFieldHelpTemplate - Updated
ArrayFieldItemTemplateto adjust buttons location usingdisplayLabelandhasDescription, fixing #3296 - Updated
FieldTemplate,ObjectFieldTemplateandWrapIfAdditionalTemplateto adjust the sizes and buttons location usingdisplayLabel
@rjsf/primereact
- Added support for rendering
ui:helpas markdown via newui:enableMarkdownInHelpflag inFieldHelpTemplate - Updated
ArrayFieldItemTemplateto adjust buttons location usingdisplayLabel, fixing #3296 - Updated
WrapIfAdditionalTemplateto adjust the sizes and buttons location usingdisplayLabelandrawDescription
@rjsf/react-bootstrap
- Added support for rendering
ui:helpas markdown via newui:enableMarkdownInHelpflag inFieldHelpTemplate - Updated
ArrayFieldItemTemplateto adjust buttons location usingdisplayLabelandhasDescription, fixing #3296 - Updated
ArrayFieldTemplateto improve it's responsiveness in relation to theArrayFieldItemTemplatechanges - Updated
FieldTemplate,ObjectFieldTemplateandWrapIfAdditionalTemplateto adjust the sizes and buttons location usingdisplayLabelandrawDescription
@rjsf/semantic-ui
- Added support for rendering
ui:helpas markdown via newui:enableMarkdownInHelpflag inFieldHelpTemplate - Updated
ArrayFieldItemTemplateto adjust buttons location usingdisplayLabelandhasDescription, fixing #3296 - Updated
FieldTemplateandWrapIfAdditionalTemplateto adjust the sizes and buttons location usingdisplayLabelandrawDescription
@rjsf/shadcn
- Added support for rendering
ui:helpas markdown via newui:enableMarkdownInHelpflag inFieldHelpTemplate - Updated
ArrayFieldItemTemplateto adjust buttons location usingdisplayLabelandhasDescription, fixing #3296 - Updated
ArrayFieldTemplateto addjustify-endto theAddButtonrendering - Updated
FieldTemplate,ObjectFieldTemplateandWrapIfAdditionalTemplateto adjust the sizes and buttons location usingdisplayLabelandrawDescription
@rjsf/utils
- Added new
enableMarkdownInHelpto theGlobalUISchemaOptionstype, fixing #4601 - Added new
displayLabelandhasDescriptionflags in theArrayFieldItemTemplatePropsto support fixing #3296 - Updated the three hooks to add
use clientdirective to support NextJS builds - Updated
WrapIfAdditionalTemplatePropsto also pick thedisplayLabelandrawDescriptionprops fromFieldPropsfor use in adjusting the Additional Properties buttons location - Fixed bug in
getDisplayLabel()to return false ALWAYS, when theui:optionsis set to false AND to return true forarrayandobjecttypes when they were added via additionalProperties
Dev / docs / playground
- Updated
uiSchema.mdin the docs to document the newenableMarkdownInHelpflag - Updated
objectTests.tsxto increase the variations of the additionalProperties tests to include labels off, descriptions and object and array types
6.0.2
@rjsf/antd
- Updated
FieldTemplateto skip label and description rendering for checkbox widgets, fixing (#4742) - Updated
ArrayFieldTemplateandObjectFieldTemplateto remove the rendering of a duplicate description (since theFieldTemplatealready does it), fixing #3624
@rjsf/chakra-ui
- Modified
CheckboxesWidgetto render the Title, fixing (#4840) - Updated
CheckboxWidgetto handle label and description rendering consistently, fixing (#4742)
@rjsf/core
- Fixed duplicate label and description rendering in
CheckboxWidgetby conditionally rendering them based on widget type- Updated
CheckboxWidgetto handle label and description rendering consistently - Modified
FieldTemplateto skip label and description rendering for checkbox widgets, fixing (#4742)
- Updated
- Updated
ObjectFieldto change the removal of an additional property to defer the work to theprocessPendingChange()handler inForm, fixing #4850 - Updated
FallbackFieldto supportobjectandarraytypes, and improvedArrayFieldso that it handles missing items properly with the fallback field
@rjsf/fluentui-rc
- Updated
FieldTemplateto skip label and description rendering for checkbox widgets, fixing (#4742)
@rjsf/mantine
- Updated
CheckboxWidgetto handle label and description rendering consistently, fixing (#4742)
@rjsf/mui
- Updated
FieldTemplateto skip label and description rendering for checkbox widgets, fixing (#4742) - Updated
ArrayFieldItemTemplateto switchsizefrom 'auto' to responsive values on theGrid, fixing #4838
@rjsf/primereact
- Updated
FieldTemplateto skip label and description rendering for checkbox widgets, fixing (#4742)
@rjsf/react-bootstrap
- Updated
FieldTemplateto skip label and description rendering for checkbox widgets, fixing (#4742)
@rjsf/semantic-ui
- Updated
FieldTemplateto skip label and description rendering for checkbox widgets, fixing (#4742)
@rjsf/shadcn
- Updated
FieldTemplateto skip label and description rendering for checkbox widgets, fixing (#4742) - Updated the
Commandcomponent to properly handleforwardRef
@rjsf/utils
- Updated
getDefaultFormState()to not save an undefined field value into an object when the type isnullandexcludeObjectChildrenis provided, fixing #4821
Dev / docs / playground
- Updated the
OptionsDrawerof the playground to addidPrefixandidSeparatorfields - Updated test files to switch to using the React Testing library instead of
react-test-renderer, updating all snapshots accordingly - Updated Fluent libraries to latest, with updated snapshots
- Added Node 24 to
ci.yml, removingv5and old Node 14 non-docs builds
6.0.1
Dev / docs / playground
- Updated peer dependencies for packages to
^6.x
6.0.0
RJSF is proud to release the new major 6.0.0 release
There are many breaking change as mentioned in the beta changelogs and described in detail in the 6.x upgrade guide
Enjoy!
Also the following changes were made since the last beta release
@rjsf/antd
- Updated the
README.mdto show the theme snapshot with the latest theme UI from the playground, making it a link to the theme
@rjsf/chakra-ui
- Updated the
README.mdto show the theme snapshot with the latest theme UI from the playground, making it a link to the theme
@rjsf/core
- Updated
SchemaFieldto add a new optional propertychildFieldPathIdto theFieldComponentrender to prevent duplicate ids, fixing (#4819)[https://github.com//issues/4819]- Also updated
ObjectFieldandArrayFieldto make children use thechildFieldPathIdif present, falling back to thefieldPathIdif not
- Also updated
Dev / docs / playground
- Updated the libraries to the latest ones that aren't problematic
Updated the playground to modernize the UI using MUI components - Updated the documentation to switch to using an animated gif based on the latest modernized playground UI
- Updated the
README.mdin all themes to show the theme snapshot with the latest theme UI from the playground, making it a link to the theme
6.0.0-beta.23
Small potential BREAKING CHANGES
- If you are overriding the
AltDateWidgetorAltDateTimeWidgetthese changes may affect you
@rjsf/antd
- Updated
AltDateWidgetto use the newuseAltDateWidgetProps()hook, renamingshowTimetotime - Potentially BREAKING CHANGE: Updated
AltDateTimeWidgetto renameshowTimeprop totime
@rjsf/chakra-ui
- Updated
AltDateWidgetto use the newuseAltDateWidgetProps()hook, renamingshowTimetotime - Potentially BREAKING CHANGE: Updated
AltDateTimeWidgetto renameshowTimeprop totime
@rjsf/core
- Updated
FormPropsto add newonChange/onBlurvalues for theliveValidateandliveOmitprops, deprecating thebooleanaspect of them - Updated
Formto support the new feature to doonBlurhandling ofliveValidateandliveOmit - Updated
FormPropsto add the newinitialFormDataprop - Updated
Formso that is behaves as a "controlled" form whenformDatais passed and uncontrolled wheninitialFormDatais passed, fixing #391- Also fixed an issue where live validation was called on the initial form render, causing errors to show immediately, partially fixing #512
- Updated
Formto add a new programmatic function,setFieldValue(fieldPath: string | FieldPathList, newValue?: T): void, fixing #2099 - Added new
FallbackFieldto add opt-in functionality to control form data that is of an unsupported or unknown type (#4736). - Refactored much of the
FileWidgetimplementation into a newuseFileWidgetProps()hook, fixing #3146 - Refactored much of the
AltDateWidgetimplementation into a newuseAltDateWidgetProps()hook, fixing #3352
@rjsf/daisyui
- Deleted the
FileWidgetcomponent, moving the className and isMulti logic directly into theBaseInputTemplateso that the@rjsf/core'sFileWidgetworks properly for the theme, fixing #4803 - Updated
AltDateWidgetto use the newuseAltDateWidgetProps()hook
@rjsf/mantine
- Updated
FieldHelpTemplateto avoid issue whenhelpandfieldPathId` are undefined - Updated
AltDateWidgetto use the newuseAltDateWidgetProps()hook, renamingshowTimetotime - Potentially BREAKING CHANGE: Updated
AltDateTimeWidgetto renameshowTimeprop totime - Updated
FileWidgetto use theuseFileWidgetProps()hook
@rjsf/utils
- Added the
useFileWidgetProps()hook implementation, refactored from@rjsf/core - Added the
useAltDateWidgetProps()hook implementation, refactored from@rjsf/core
Dev / docs / playground
- Updated the playground to switch
liveValidateandliveOmitfrom checkboxes to radio buttons for the new options - Updated
internals.md,form-props.md,utility-functions.mdandv6x upgrade guide.mdto document the new features, potential breaking changes and deprecations
6.0.0-beta.22
Many BREAKING CHANGES
- Due to some refactoring and performance improvements, every theme and
@rjsf/utilshave breaking changes that MAY affect your code base, especially if you have custom fields, template or widgets.
@rjsf/antd
- Updated most of the widgets to get
formContextfrom theregistryinstead of thepropssince it will no longer be passed - BREAKING CHANGE: Updated
FieldTemplate,ObjectFieldTemplateandWrapIfAdditionalTemplateto rename the oldadditionalPropertiesinterface props to the new ones - Updated
BaseInputTemplate,CheckboxesWidget,CheckboxWidget,RadioWidget,SelectWidget, andTextareaWidgetto usehtmlNamefor the HTMLnameattribute - BREAKING CHANGE: Updated
ArrayFieldTemplateto remove theArrayFieldItemTemplaterender in favor of simply usingitemsdue toArrayFieldchanges
@rjsf/chakra-ui
- BREAKING CHANGE: Updated
FieldTemplate,ObjectFieldTemplateandWrapIfAdditionalTemplateto rename the oldadditionalPropertiesinterface props to the new ones - Updated
BaseInputTemplate,CheckboxesWidget,CheckboxWidget,RadioWidget,SelectWidget, andTextareaWidgetto usehtmlNamefor the HTMLnameattribute - BREAKING CHANGE: Updated
ArrayFieldTemplateto remove theArrayFieldItemTemplaterender in favor of simply usingitemsdue toArrayFieldchanges
@rjsf/core
- Updated
MultiSchemaFieldandSchemaFieldto properly displayanyOf/oneOfoptional data fields by hiding the label and selector control when it is an optional field AND there is no form data - Updated
ArrayField,BooleanField,LayoutMultiSchemaField,MultiSchemaField,ObjectField,SchemaField,StringFieldandBaseInputTemplateto removeformContextfrom the props - Updated
ObjectFieldto refactor the code from a class component to two stateless functional components, replacing the 3 generator-props with the 4 memoized props mentioned in the@rjsf/utilschanges - Updated
Formto "memoize" thefieldPathIdandregistryinto theFormState, adding atoIChangeEvent()helper to restrict the state returned on theIChangeEventinterface callbacks - BREAKING CHANGE: Updated
FieldTemplate,ObjectFieldTemplateandWrapIfAdditionalTemplateto rename the oldadditionalPropertiesinterface props to the new ones - Added
nameGeneratorprop toFormcomponent to enable custom HTMLnameattribute generation for form fields - Updated
ArrayFieldto refactor code from a class component to seven stateless functional components, replacing the 4 generator-props with the 5 memoized props mentioned in the@rjsf/utilschanges- BREAKING CHANGE: The refactor included rendering the
ArrayFieldItemTemplatedirectly by theArrayFieldrather than deferring it to theArrayFieldTemplate - Updated the
ArrayFieldtests to adjust for the rendering change AND to remove 2 tests due to them no longer being valid
- BREAKING CHANGE: The refactor included rendering the
- BREAKING CHANGE: Updated
ArrayFieldTemplateto remove theArrayFieldItemTemplaterender in favor of simply usingitemsdue toArrayFieldchanges - BREAKING CHANGE: Updated
ArrayFieldItemButtonsTemplateto replace the old callback-generator functions with the new memoizable callback functions - Fixed a bug in
Formto avoid getting errors being reported at the root level viaonChangewhen there aren't - Refactored
LayoutGridFieldas function components instead of a single class component.
@rjsf/daisyui
- Updated the test mocks to remove
formContextfor the widget mock - BREAKING CHANGE: Updated
FieldTemplate,ObjectFieldTemplateandWrapIfAdditionalTemplateto rename the oldadditionalPropertiesinterface props to the new ones - Updated
BaseInputTemplate,CheckboxesWidget,CheckboxWidget,RadioWidget, andTextareaWidgetto usehtmlNamefor the HTMLnameattribute - BREAKING CHANGE: Updated
ArrayFieldTemplateto remove theArrayFieldItemTemplaterender in favor of simply usingitemsdue toArrayFieldchanges - BREAKING CHANGE: Updated
ArrayFieldItemButtonsTemplateto replace the old callback-generator functions with the new memoizable callback functions
@rjsf/fluentui-rc
- BREAKING CHANGE: Updated
FieldTemplate,ObjectFieldTemplateandWrapIfAdditionalTemplateto rename the oldadditionalPropertiesinterface props to the new ones - Updated
BaseInputTemplate,CheckboxesWidget,CheckboxWidget,RadioWidget,SelectWidget, andTextareaWidgetto usehtmlNamefor the HTMLnameattribute - BREAKING CHANGE: Updated
ArrayFieldTemplateto remove theArrayFieldItemTemplaterender in favor of simply usingitemsdue toArrayFieldchanges
@rjsf/mantine
- BREAKING CHANGE: Updated
FieldTemplate,ObjectFieldTemplateandWrapIfAdditionalTemplateto rename the oldadditionalPropertiesinterface props to the new ones - Updated
BaseInputTemplate,CheckboxesWidget,CheckboxWidget,RadioWidget,SelectWidget, andTextareaWidgetto usehtmlNamefor the HTMLnameattribute - BREAKING CHANGE: Updated
ArrayFieldTemplateto remove theArrayFieldItemTemplaterender in favor of simply usingitemsdue toArrayFieldchanges
@rjsf/mui
- Updated
BaseInputTemplateandSelectWidgetto removeformContextfrom the props - BREAKING CHANGE: Updated
FieldTemplate,ObjectFieldTemplateandWrapIfAdditionalTemplateto rename the oldadditionalPropertiesinterface props to the new ones - Updated
BaseInputTemplate,CheckboxesWidget,CheckboxWidget,RadioWidget,SelectWidget, andTextareaWidgetto usehtmlNamefor the HTMLnameattribute - BREAKING CHANGE: Updated
ArrayFieldTemplateto remove theArrayFieldItemTemplaterender in favor of simply usingitemsdue toArrayFieldchanges
@rjsf/primereact
- Updated
SelectWidgetto removeformContextfrom the props - BREAKING CHANGE: Updated
FieldTemplate,ObjectFieldTemplateandWrapIfAdditionalTemplateto rename the oldadditionalPropertiesinterface props to the new ones - Updated
BaseInputTemplate,CheckboxesWidget,CheckboxWidget,RadioWidget,SelectWidget, andTextareaWidgetto usehtmlNamefor the HTMLnameattribute - BREAKING CHANGE: Updated
ArrayFieldTemplateto remove theArrayFieldItemTemplaterender in favor of simply usingitemsdue toArrayFieldchanges
@rjsf/react-bootstrap
- BREAKING CHANGE: Updated
FieldTemplate,ObjectFieldTemplateandWrapIfAdditionalTemplateto rename the oldadditionalPropertiesinterface props to the new ones - Updated
BaseInputTemplate,CheckboxesWidget,CheckboxWidget,RadioWidget,SelectWidget, andTextareaWidgetto usehtmlNamefor the HTMLnameattribute - BREAKING CHANGE: Updated
ArrayFieldTemplateto remove theArrayFieldItemTemplaterender in favor of simply usingitemsdue toArrayFieldchanges
@rjsf/semantic-ui
- BREAKING CHANGE: Updated
FieldTemplate,ObjectFieldTemplateandWrapIfAdditionalTemplateto rename the oldadditionalPropertiesinterface props to the new ones - Updated
BaseInputTemplate,CheckboxesWidget,CheckboxWidget,RadioWidget,SelectWidget, andTextareaWidgetto usehtmlNamefor the HTMLnameattribute - BREAKING CHANGE: Updated
ArrayFieldTemplateto remove theArrayFieldItemTemplaterender in favor of simply usingitemsdue toArrayFieldchanges - Updated
ArrayFieldItemTemplateto refactor the getting of thesemanticPropsfromArrayFieldTemplate, using the newparentUiSchemaprop to maintain the feature
@rjsf/shadcn
- Updated the test mocks to remove
formContextfor the widget mock and addedglobalFormOptionsin the registry mock - BREAKING CHANGE: Updated
FieldTemplate,ObjectFieldTemplateandWrapIfAdditionalTemplateto rename the oldadditionalPropertiesinterface props to the new ones - Updated
BaseInputTemplate,CheckboxesWidget,CheckboxWidget,SelectWidget, andTextareaWidgetto usehtmlNamefor the HTMLnameattribute (Note:RadioWidgetdoes not supporthtmlNamedue to Radix UI RadioGroup limitations) - BREAKING CHANGE: Updated
ArrayFieldTemplateto remove theArrayFieldItemTemplaterender in favor of simply usingitemsdue toArrayFieldchanges
@rjsf/utils
- BREAKING CHANGE: Updated
FieldTemplatePropsandWrapIfAdditionalTemplatePropsto replace theonKeyChange()andonDropPropertyClick()callback-generator props with theonKeyRename(),onKeyRenameBlur()andonRemoveProperty()callback props - BREAKING CHANGE: Updated
ObjectFieldTemplatePropsto replace theonAddClick()callback-generator prop with theonAddProperty()callback prop - Added new hook
useDeepCompareMemo()and its associated tests - Added
NameGeneratorFunctiontype and two built-in name generators:bracketNameGeneratoranddotNotationNameGenerator - Updated
GlobalFormOptionstype to include optionalnameGeneratorfield - Updated
toFieldPathId()function to support name generation via thenameGeneratoroption inGlobalFormOptions - Added
htmlNamefield toWidgetPropsinterface to provide the generated HTMLnameattribute to widgets - BREAKING CHANGE: Renamed
ArrayFieldItemTemplateTypetoArrayFieldItemTemplatePropsand updated it to changekey: stringtoitemKey: stringto avoid a name collision with React - BREAKING CHANGE: Updated
ArrayFieldTemplatePropsto change the type of theitemsprop fromArrayFieldItemTemplateType<T, S, F>[]toReactElement[] - BREAKING CHANGE: Updated
ArrayFieldItemButtonsTemplateTypeto replace theonAddIndexClick(),onCopyIndexClick(),onDropIndexClick()andonReorderClick()callback-generator props with theonAddItem(),onCopyItem(),onMoveUpItem(),onMoveDownItem()andonRemoveItem()callback props - BREAKING CHANGE: Updated `Ar...
6.0.0-beta.21
New feature added
- Optional Data Controls - see docs
@rjsf/antd
- Updated
ArrayFieldTemplate,ObjectFieldTemplate,TitleFieldto add support for the newoptionalDataControlfeature- Added the new
OptionalDataControlTemplateto the theme, adding it to thetemplateslist
- Added the new
- Updated the
ButtonTemplatesclasses to fix up the props inAntdIconButtonPropsand theIconButtons associated with them to better support theOptionalDataControlTemplate
@rjsf/chakra-ui
- Updated
ArrayFieldTemplate,ObjectFieldTemplate,TitleFieldto add support for the newoptionalDataControlfeature- Added the new
OptionalDataControlTemplateto the theme, adding it to thetemplateslist
- Added the new
- Updated the
ButtonTemplatesclasses to addChakraIconButtonPropsand theIconButtons associated with them to better support theOptionalDataControlTemplate
@rjsf/core
- Added
initialDefaultsGeneratedflag to state, which indicates whether the initial generation of defaults has been completed - Added
ObjectFieldtests for additionalProperties with defaults - Added a new
OptionalDataControlsFieldto thefieldsthat renders either undefined (when there is data for a readonly/disabled field) or gets theOptionalDataControlsTemplateand renders thelabeland potentially anonAddClickoronRemoveClickfunction - Updated
ArrayFieldandObjectFieldto check whether itshouldRenderOptionalData()and if true, callsObjectDataControlsFieldand passes the result to its associated render template asoptionalDataControl - Updated
ArrayFieldTemplate,ObjectFieldTemplate,TitleFieldto add support for the newoptionalDataControlfeature- Added the new
OptionalDataControlTemplateto the theme, adding it to thetemplateslist
- Added the new
- Updated
Formas follows to fix #4796- Refactored the
liveValidate()andmergeErrors()functions out ofgetStateFromProp()andprocessPendingChange() - Added new, optional
customErrors?: ErrorSchemaBuilder<T>to theFormState, updating theIChangeEventinterface to remove all of the private variables - Reworked the
newErrorSchemahandling inprocessPendingChange()to simplify the handling sincenewErrorSchemais now path-specific, addingnewErrorSchematocustomErrorswhen 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()andfilterErrorsBasedOnSchema()methods
- Refactored the
- Updated
LayoutGridFieldto simplifyonFieldChange()to just return the givenerrorSchemanow that it is path-specific, fixing #4796 - Updated
NullFieldto passfieldPathId.pathfor theonChange()instead of[name]
@rjsf/daisyui
- Updated
ArrayFieldTemplate,ArrayFieldTitleTemplate,ObjectFieldTemplate,TitleFieldto add support for the newoptionalDataControlfeature- Added the new
OptionalDataControlTemplateto the theme, adding it to thetemplateslist
- Added the new
- Updated the
ButtonTemplatesclasses to better support theOptionalDataControlTemplate
@rjsf/fluentui-rc
- Updated
ArrayFieldTemplate,ObjectFieldTemplate,TitleFieldto add support for the newoptionalDataControlfeature- Added the new
OptionalDataControlTemplateto the theme, adding it to thetemplateslist
- Added the new
- Updated the
ButtonTemplatesclasses to addFluentIconButtonPropsand theIconButtons associated with them to better support theOptionalDataControlTemplate
@rjsf/mantine
- Updated
ArrayFieldTemplate,ObjectFieldTemplate,TitleFieldto add support for the newoptionalDataControlfeature- Added the new
OptionalDataControlTemplateto the theme, adding it to thetemplateslist
- Added the new
@rjsf/mui
- Updated
ArrayFieldTemplate,ObjectFieldTemplate,TitleFieldto add support for the newoptionalDataControlfeature- Added the new
OptionalDataControlTemplateto the theme, adding it to thetemplateslist
- Added the new
@rjsf/primereact
- Updated
ArrayFieldTemplate,ObjectFieldTemplate,TitleFieldto add support for the newoptionalDataControlfeature- Added the new
OptionalDataControlTemplateto the theme, adding it to thetemplateslist
- Added the new
- Updated the
ButtonTemplatesclasses to addPrimeIconButtonPropsand theIconButtons associated with them to better support theOptionalDataControlTemplate
@rjsf/react-bootstrap
- Updated
ArrayFieldTemplate,ObjectFieldTemplate,TitleFieldto add support for the newoptionalDataControlfeature- Added the new
OptionalDataControlTemplateto the theme, adding it to thetemplateslist
- Added the new
- Updated the
ButtonTemplatesclasses to addBootstrapIconButtonPropsand theIconButtons associated with them to better support theOptionalDataControlTemplate
@rjsf/semantic-ui
- Updated
ArrayFieldTemplate,ObjectFieldTemplate,TitleFieldto add support for the newoptionalDataControlfeature- Added the new
OptionalDataControlTemplateto the theme, adding it to thetemplateslist
- Added the new
- Updated the
ButtonTemplatesclasses to addSemanticIconButtonPropsand theIconButtons associated with them to better support theOptionalDataControlTemplate
@rjsf/shadcn
- Updated
ArrayFieldTemplate,ObjectFieldTemplate,TitleFieldto add support for the newoptionalDataControlfeature- Added the new
OptionalDataControlTemplateto the theme, adding it to thetemplateslist
- Added the new
- Updated the
ButtonTemplatesclasses to addShadIconButtonPropsand theIconButtons associated with them to better support theOptionalDataControlTemplate
@rjsf/utils
- Updated
getDefaultFormStateto add a newinitialDefaultsGeneratedprop flag, along with type definitions, fixing uneditable & permanent defaults with additional properties 3759 - Updated
createSchemaUtilsdefinition to reflect addition ofinitialDefaultsGenerated - Updated existing tests where
getDefaultFormStateis used to reflect addition ofinitialDefaultsGenerated - Updated
types.tsto support the newOptional Data Controlsfeature as follows:- Added new
OptionalDataControlsTemplatePropsand refactored the common props fromArrayFieldTemplatePropsandObjectFieldTemplatePropsinto a new super type,ContainerFieldTemplateProps - Added new
optionalDataControl?: ReactNodeto theArrayFieldTitleProps,TitleFieldPropsandContainerFieldTemplateProps - Updated
GlobalFormOptionsto add newenableOptionalDataFieldForType?: ('object' | 'array')[]prop - Updated
SchemaUtilsType'sretrieveSchema()function to add an additional, propertyresolveAnyOfOrOneOfRefs?: boolean
- Added new
- Updated the
Templatesinterface to add a new required templateOptionalDataControlsTemplate: ComponentType<OptionalDataControlsTemplateProps<T, S, F>> - Updated
retrieveSchema()to add an additional propertyresolveAnyOfOrOneOfRefs?: booleanwhich causesresolveAllSchemas()to resolve$refs inside of the options ofanyOf/oneOfschemas - Updated
getDefaultFormStateto fix an issue where optional array props had their default set to an empty array when they shouldn't be - Updated the
TranslatableStringenum to add three new strings in support of the new feature:OptionalObjectAdd,OptionalObjectRemoveandOptionalObjectEmptyMsg - Added four new utility functions:
isFormDataAvailable(),isRootSchema(),optionalControlsId(), andshouldRenderOptionalField() - Updated
validationDataMerge()to add an additional, optional parameterpreventDuplicates = false, that causes themergeObjects()call to receivepreventDuplicatesinstead oftrue
Dev / docs / playground
- Updated docs for
getDefaultFormStateto reflect addition of theinitialDefaultsGeneratedprop - Updated
utility-function.medocs to add documentation for the new functions and to update thevalidationDataMerge()function's new parameter- Also updated docs for
retrieveSchemaandSchemaUtilsTypefor the new prop
- Also updated docs for
- Updated
uiSchema.mdto add documentation for the newenableOptionalDataFieldForTypeprop - Updated the playground to add a new
Optional Data Controlsexample - Updated the snapshot and jest tests for
Formto test the newOptional Data Controlsfeature - Updated
custom-widgets-fields.mdto change the documentation around passing errors viaonChange()to reflect the new reality - Updated the
v6x upgrade guide.mdto document the new feature, utility functions and changes to existing method parameters
6.0.0-beta.20
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
idSchematofieldPathIdor to remove the<T>off of the idGenerator functions
@rjsf/chakra-ui
- BREAKING CHANGES - Updated all of the templates and widgets to change
idSchematofieldPathIdor to remove the<T>off of the idGenerator functions
@rjsf/core
- BREAKING CHANGES
- Updated all of the fields, templates and widgets to change
idSchematofieldPathIdor to remove the<T>off of the idGenerator functions ObjectFieldandArrayFieldto usetoFieldPathIdinstead oftoIdSchema()to generate thefieldPathIds of all its children- Updated the
onChangehandling of fields to makepathrequired and either pass it straight through, or use thefieldPathId.pathinstead of using an empty array or appending path information - Updated
Formto usetoFieldPathId()to generatefieldPathIdinstead ofidSchema, always providing theidPrefixandidSeparatorin theglobalFormOptionsand make thepath: FieldPathListrequired - Updated
LayoutGridFieldto remove theIdSchemarelated code in favor ofFieldPathIdcode
- Updated all of the fields, templates and widgets to change
- Also exported the
getTestRegistry()function from the mainindex.tsto assist developers in creatingregistryobject for tests - Updated all of the test to deal with the
idSchema->fieldPathIdchanges
@rjsf/daisyui
- BREAKING CHANGES - Updated all of the templates and widgets to change
idSchematofieldPathIdor to remove the<T>off of the idGenerator functions - Also fixed the
FieldTemplateto extract thedescriptionelement so that it was not spread onto thediv, fixing the snapshots
@rjsf/fluent-ui
- BREAKING CHANGES - Updated all of the templates and widgets to change
idSchematofieldPathIdor to remove the<T>off of the idGenerator functions
@rjsf/mantine
- BREAKING CHANGES - Updated all of the templates and widgets to change
idSchematofieldPathIdor to remove the<T>off of the idGenerator functions
@rjsf/mui
- BREAKING CHANGES - Updated all of the templates and widgets to change
idSchematofieldPathIdor to remove the<T>off of the idGenerator functions
@rjsf/primereact
- BREAKING CHANGES - Updated all of the templates and widgets to change
idSchematofieldPathIdor to remove the<T>off of the idGenerator functions
@rjsf/react-bootstrap
- BREAKING CHANGES - Updated all of the templates and widgets to change
idSchematofieldPathIdor to remove the<T>off of the idGenerator functions
@rjsf/semantic-ui
- BREAKING CHANGES - Updated all of the templates and widgets to change
idSchematofieldPathIdor to remove the<T>off of the idGenerator functions
@rjsf/shadcn
- BREAKING CHANGES - Updated all of the templates and widgets to change
idSchematofieldPathIdor to remove the<T>off of the idGenerator functions
@rjsf/utils
- Added new
FieldPathListandFieldPathIdtypes andDEFAULT_ID_PREFIXandDEFAULT_ID_SEPARATORtoconstants.ts - Added the new
toFieldPathId()function to generateFieldPathIds, exporting it from the library - Deprecated the
ui:rootFieldIdin theUiSchemasinceidPrefixdoes the same exact thing - BREAKING CHANGES
- Removed the
IdSchematype, replacingidSchema: IdSchema<T>in all types withfieldPathId: FieldPathId - Updated the
idGeneratorsto replaceid: IdSchema<T> | stringwithid: FieldPathId | stringremoving the need for the<T = any>generic on the functions - Removed the
toIdSchema()function in theschemadirectory - Updated the
FieldPropstype'sonChange()callback to make thepath: FieldPathListparameter be required instead of optional - Updated the
SchemaUtilsTypeandcreateSchemaUtils()to remove thetoIdSchema()function
- Removed the
@rjsf/validator-ajv8
- Updated the test to no longer try to test the delete
toIdSchemafunction
Dev / docs / playground
- Updated
custom-templates.md,custom-widgets-fields.mdandlayout-grid.mdto change theidSchemadocumentation tofieldPathId - Updated
uiSchema.mdto mark theui:rootFieldIdas deprecated in the documentation - Updated
utility-functions.mddeletetoIdSchema(), addtoFieldPathId()and to remove the<T>from the id generator functions - Updated
v6.x upgrade guide.mdto document all the breaking changes, new functions and deprecations made in6.0.0-beta.20