Many BREAKING CHANGES
- Due to some refactoring and performance improvements, every theme and
@rjsf/utils
have breaking changes
@rjsf/antd
- Updated most of the widgets to get
formContext
from theregistry
instead of theprops
since it will no longer be passed - BREAKING CHANGE: Updated
FieldTemplate
,ObjectFieldTemplate
andWrapIfAdditionalTemplate
to rename the oldadditionalProperties
interface props to the new ones - Updated
BaseInputTemplate
,CheckboxesWidget
,CheckboxWidget
,RadioWidget
,SelectWidget
, andTextareaWidget
to usehtmlName
for the HTMLname
attribute - BREAKING CHANGE: Updated
ArrayFieldTemplate
to remove theArrayFieldItemTemplate
render in favor of simply usingitems
due toArrayField
changes
@rjsf/chakra-ui
- BREAKING CHANGE: Updated
FieldTemplate
,ObjectFieldTemplate
andWrapIfAdditionalTemplate
to rename the oldadditionalProperties
interface props to the new ones - Updated
BaseInputTemplate
,CheckboxesWidget
,CheckboxWidget
,RadioWidget
,SelectWidget
, andTextareaWidget
to usehtmlName
for the HTMLname
attribute - BREAKING CHANGE: Updated
ArrayFieldTemplate
to remove theArrayFieldItemTemplate
render in favor of simply usingitems
due toArrayField
changes
@rjsf/core
- Updated
MultiSchemaField
andSchemaField
to properly displayanyOf
/oneOf
optional 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
,StringField
andBaseInputTemplate
to removeformContext
from the props - Updated
ObjectField
to 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/utils
changes - Updated
Form
to "memoize" thefieldPathId
andregistry
into theFormState
, adding atoIChangeEvent()
helper to restrict the state returned on theIChangeEvent
interface callbacks - BREAKING CHANGE: Updated
FieldTemplate
,ObjectFieldTemplate
andWrapIfAdditionalTemplate
to rename the oldadditionalProperties
interface props to the new ones - Added
nameGenerator
prop toForm
component to enable custom HTMLname
attribute generation for form fields - Updated
ArrayField
to 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/utils
changes- BREAKING CHANGE: The refactor included rendering the
ArrayFieldItemTemplate
directly by theArrayField
rather than deferring it to theArrayFieldTemplate
- Updated the
ArrayField
tests 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
ArrayFieldTemplate
to remove theArrayFieldItemTemplate
render in favor of simply usingitems
due toArrayField
changes - BREAKING CHANGE: Updated
ArrayFieldItemButtonsTemplate
to replace the old callback-generator functions with the new memoizable callback functions - Fixed a bug in
Form
to avoid getting errors being reported at the root level viaonChange
when there aren't - Refactored
LayoutGridField
as function components instead of a single class component.
@rjsf/daisyui
- Updated the test mocks to remove
formContext
for the widget mock - BREAKING CHANGE: Updated
FieldTemplate
,ObjectFieldTemplate
andWrapIfAdditionalTemplate
to rename the oldadditionalProperties
interface props to the new ones - Updated
BaseInputTemplate
,CheckboxesWidget
,CheckboxWidget
,RadioWidget
, andTextareaWidget
to usehtmlName
for the HTMLname
attribute - BREAKING CHANGE: Updated
ArrayFieldTemplate
to remove theArrayFieldItemTemplate
render in favor of simply usingitems
due toArrayField
changes - BREAKING CHANGE: Updated
ArrayFieldItemButtonsTemplate
to replace the old callback-generator functions with the new memoizable callback functions
@rjsf/fluentui-rc
- BREAKING CHANGE: Updated
FieldTemplate
,ObjectFieldTemplate
andWrapIfAdditionalTemplate
to rename the oldadditionalProperties
interface props to the new ones - Updated
BaseInputTemplate
,CheckboxesWidget
,CheckboxWidget
,RadioWidget
,SelectWidget
, andTextareaWidget
to usehtmlName
for the HTMLname
attribute - BREAKING CHANGE: Updated
ArrayFieldTemplate
to remove theArrayFieldItemTemplate
render in favor of simply usingitems
due toArrayField
changes
@rjsf/mantine
- BREAKING CHANGE: Updated
FieldTemplate
,ObjectFieldTemplate
andWrapIfAdditionalTemplate
to rename the oldadditionalProperties
interface props to the new ones - Updated
BaseInputTemplate
,CheckboxesWidget
,CheckboxWidget
,RadioWidget
,SelectWidget
, andTextareaWidget
to usehtmlName
for the HTMLname
attribute - BREAKING CHANGE: Updated
ArrayFieldTemplate
to remove theArrayFieldItemTemplate
render in favor of simply usingitems
due toArrayField
changes
@rjsf/mui
- Updated
BaseInputTemplate
andSelectWidget
to removeformContext
from the props - BREAKING CHANGE: Updated
FieldTemplate
,ObjectFieldTemplate
andWrapIfAdditionalTemplate
to rename the oldadditionalProperties
interface props to the new ones - Updated
BaseInputTemplate
,CheckboxesWidget
,CheckboxWidget
,RadioWidget
,SelectWidget
, andTextareaWidget
to usehtmlName
for the HTMLname
attribute - BREAKING CHANGE: Updated
ArrayFieldTemplate
to remove theArrayFieldItemTemplate
render in favor of simply usingitems
due toArrayField
changes
@rjsf/primereact
- Updated
SelectWidget
to removeformContext
from the props - BREAKING CHANGE: Updated
FieldTemplate
,ObjectFieldTemplate
andWrapIfAdditionalTemplate
to rename the oldadditionalProperties
interface props to the new ones - Updated
BaseInputTemplate
,CheckboxesWidget
,CheckboxWidget
,RadioWidget
,SelectWidget
, andTextareaWidget
to usehtmlName
for the HTMLname
attribute - BREAKING CHANGE: Updated
ArrayFieldTemplate
to remove theArrayFieldItemTemplate
render in favor of simply usingitems
due toArrayField
changes
@rjsf/react-bootstrap
- BREAKING CHANGE: Updated
FieldTemplate
,ObjectFieldTemplate
andWrapIfAdditionalTemplate
to rename the oldadditionalProperties
interface props to the new ones - Updated
BaseInputTemplate
,CheckboxesWidget
,CheckboxWidget
,RadioWidget
,SelectWidget
, andTextareaWidget
to usehtmlName
for the HTMLname
attribute - BREAKING CHANGE: Updated
ArrayFieldTemplate
to remove theArrayFieldItemTemplate
render in favor of simply usingitems
due toArrayField
changes
@rjsf/semantic-ui
- BREAKING CHANGE: Updated
FieldTemplate
,ObjectFieldTemplate
andWrapIfAdditionalTemplate
to rename the oldadditionalProperties
interface props to the new ones - Updated
BaseInputTemplate
,CheckboxesWidget
,CheckboxWidget
,RadioWidget
,SelectWidget
, andTextareaWidget
to usehtmlName
for the HTMLname
attribute - BREAKING CHANGE: Updated
ArrayFieldTemplate
to remove theArrayFieldItemTemplate
render in favor of simply usingitems
due toArrayField
changes - Updated
ArrayFieldItemTemplate
to refactor the getting of thesemanticProps
fromArrayFieldTemplate
, using the newparentUiSchema
prop to maintain the feature
@rjsf/shadcn
- Updated the test mocks to remove
formContext
for the widget mock and addedglobalFormOptions
in the registry mock - BREAKING CHANGE: Updated
FieldTemplate
,ObjectFieldTemplate
andWrapIfAdditionalTemplate
to rename the oldadditionalProperties
interface props to the new ones - Updated
BaseInputTemplate
,CheckboxesWidget
,CheckboxWidget
,SelectWidget
, andTextareaWidget
to usehtmlName
for the HTMLname
attribute (Note:RadioWidget
does not supporthtmlName
due to Radix UI RadioGroup limitations) - BREAKING CHANGE: Updated
ArrayFieldTemplate
to remove theArrayFieldItemTemplate
render in favor of simply usingitems
due toArrayField
changes
@rjsf/utils
- BREAKING CHANGE: Updated
FieldTemplateProps
andWrapIfAdditionalTemplateProps
to replace theonKeyChange()
andonDropPropertyClick()
callback-generator props with theonKeyRename()
,onKeyRenameBlur()
andonRemoveProperty()
callback props - BREAKING CHANGE: Updated
ObjectFieldTemplateProps
to replace theonAddClick()
callback-generator prop with theonAddProperty()
callback prop - Added new hook
useDeepCompareMemo()
and its associated tests - Added
NameGeneratorFunction
type and two built-in name generators:bracketNameGenerator
anddotNotationNameGenerator
- Updated
GlobalFormOptions
type to include optionalnameGenerator
field - Updated
toFieldPathId()
function to support name generation via thenameGenerator
option inGlobalFormOptions
- Added
htmlName
field toWidgetProps
interface to provide the generated HTMLname
attribute to widgets - BREAKING CHANGE: Renamed
ArrayFieldItemTemplateType
toArrayFieldItemTemplateProps
and updated it to changekey: string
toitemKey: string
to avoid a name collision with React - BREAKING CHANGE: Updated
ArrayFieldTemplateProps
to change the type of theitems
prop fromArrayFieldItemTemplateType<T, S, F>[]
toReactElement[]
- BREAKING CHANGE: Updated
ArrayFieldItemButtonsTemplateType
to replace theonAddIndexClick()
,onCopyIndexClick()
,onDropIndexClick()
andonReorderClick()
callback-generator props with theonAddItem()
,onCopyItem()
,onMoveUpItem()
,onMoveDownItem()
andonRemoveItem()
callback props - BREAKING CHANGE: Updated
ArrayFieldItemTemplateType
to changekey: string
toitemKey: string
to avoid a name collision with React - BREAKING CHANGE: Renamed
ArrayFieldItemButtonsTemplateType
toArrayFieldItemButtonsTemplateProps
and 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.tsx
snapshots to add ananyOf
of 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.tsx
in theoptionalDataControls.ts
sample, moving theexperimental_defaultFormStateBehavior
inside of aliveSettings
block - Updated the
Sample
andLiveSettings
types to support theliveSettings
inside of a sample - Updated the
Playground
'sonSampleSelected
callback to merge anyliveSettings
in the sample on top of those already used in the playground - Updated the
customFieldAnyOf
sample to switchIdSchema
toFieldPathId
- Updated the
customArray
sample to refactor out aArrayFieldItemButtonsTemplate
- Updated the
custom-templates.md
documentation to reflect theadditionalProperties
-based interface props replacement andArrayField
conversion changes - Updated the
utility-functions.md
documentation to add the newuseDeepCompareMemo()
hook - Updated the
v6.x upgrade guide.md
documentation to add the BREAKING CHANGES to theArrayFieldTemplateProps
,ArrayFieldItemTemplateType
,ArrayFieldItemButtonsTemplateType
,FieldTemplateProps
,ObjectFieldTemplateProps
andWrapIfAdditionalTemplateProps
interface props changes and theuseDeepCompareMemo()
hook - Added documentation for the
nameGenerator
prop inform-props.md
and v6.x upgrade guide - Updated
@rjsf/snapshot-tests
package to explicitly depend on@rjsf/core
to build first, fixing an error with parallelized builds