6.0.0-beta.22
Pre-release
Pre-release
·
52 commits
to main
since this release
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
ArrayFieldItemTemplateTypeto changekey: stringtoitemKey: stringto avoid a name collision with React - BREAKING CHANGE: Renamed
ArrayFieldItemButtonsTemplateTypetoArrayFieldItemButtonsTemplatePropsand updated it to replace theonAddIndexClick(),onCopyIndexClick(),onDropIndexClick()andonReorderClick()callback-generator props with theonAddItem(),onCopyItem(),onMoveUpItem(),onMoveDownItem()andonRemoveItem()callback props
Dev / docs / playground
- Updated the
formTests.tsxsnapshots to add ananyOfof all arrays with different item types and removed the disabling of the optional data controls feature for the optional object with oneOfs- Updated the snapshots in all of the themes accordingly
- Updated the playground to make the same changes as
formTests.tsxin theoptionalDataControls.tssample, moving theexperimental_defaultFormStateBehaviorinside of aliveSettingsblock - Updated the
SampleandLiveSettingstypes to support theliveSettingsinside of a sample - Updated the
Playground'sonSampleSelectedcallback to merge anyliveSettingsin the sample on top of those already used in the playground - Updated the
customFieldAnyOfsample to switchIdSchematoFieldPathId - Updated the
customArraysample to refactor out aArrayFieldItemButtonsTemplate - Updated the
custom-templates.mddocumentation to reflect theadditionalProperties-based interface props replacement andArrayFieldconversion changes - Updated the
utility-functions.mddocumentation to add the newuseDeepCompareMemo()hook - Updated the
v6.x upgrade guide.mddocumentation to add the BREAKING CHANGES to theArrayFieldTemplateProps,ArrayFieldItemTemplateType,ArrayFieldItemButtonsTemplateType,FieldTemplateProps,ObjectFieldTemplatePropsandWrapIfAdditionalTemplatePropsinterface props changes and theuseDeepCompareMemo()hook - Added documentation for the
nameGeneratorprop inform-props.mdand v6.x upgrade guide - Updated
@rjsf/snapshot-testspackage to explicitly depend on@rjsf/coreto build first, fixing an error with parallelized builds