@rjsf/utils
Advanced tools
Changelog
5.0.0-beta.15
schema
along to the ArrayFieldItemTemplate
as part of the fix for #3253onChange
handler in the RangeWidget
, fixing #2161onChange
handler in the RangeWidget
, fixing #2161ArrayFieldItemTemplate
to add schema
as part of the fix for #3253allOf
s (#3025, #3227), fixing #2923ErrorSchemaBuilder
class to enable building a proper ErrorSchema
without crazy castings, fixing #3239ErrorSchemaBuilder
in the toErrorSchema()
function to simplify the implementationErrorSchemaBuilder
in the toErrorSchema()
function to simplify the implementationErrorSchema
, fixing #3260Changelog
5.0.0-beta.14
ref
definition to ThemeProps
fixing #2135onChange
handler in Form
to use the new preventDuplicates
mode of mergeObjects()
when merging extraErrors
when live validation is off, fixing #3169computedDefaults
(used by getDefaultFormState
) to skip saving the computed default if it's an empty object unless includeUndefinedValues
is truthy, fixing #2150 and #2708getDefaultFormState
util's includeUndefinedValues
prop to accept a boolean or "excludeObjectChildren"
if it does not want to include undefined values in nested objectsmergeObjects
to add new preventDuplicates
mode when concatenating arrays so that only unique values from the source object array are copied to the destination object arrayisObject
to correctly identify 'Date' as not an object, similar to 'File', thus preventing them from being merged with Object default values.Changelog
5.0.0-beta.13
$id
s, use a pre-compiled Ajv validation function when available.$id
s, fixing #2821.Changelog
5.0.0-beta.12
@rjsf/validator-ajv8
fixing #3110@rjsf/validator-ajv8
fixing #3110@rjsf/validator-ajv8
fixing #3110false
, top
or bottom
; true
is no longer a valid value as the default changed from true
to top
#634S extends StrictRJSFSchema = RJSFSchema
, for schema
/rootSchema
to every component that needed it.@rjsf/validator-ajv8
fixing #3110F = any
generic to be F extends FormContextType = any
to better support how formContext
is defined and used, partially fixing #3072@rjsf/validator-ajv8
fixing #3110@rjsf/validator-ajv8
fixing #3110@rjsf/validator-ajv8
fixing #3110@rjsf/validator-ajv8
fixing #3110schema
/rootSchema
to add the generic S extends StrictRJSFSchema = RJSFSchema
and use S
as the type for them.
StrictRJSFSchema
was added as the alias to JSON7Schema
and RJSFSchema
was modified to be StrictRJSFSchema & GenericObjectType
F = any
generic because it is assumed that more people will want to change the schema than the formContext typesValidatorType
interface to add a new rawValidation()
method for use by the playgroundFormContextType
alias to GenericObjectType
and changing the F = any
generic to be F extends FormContextType = any
to better support how formContext
is defined and used, partially fixing #3072RJSFSchema
type change@rjsf/validator-ajv8
rawValidation()
function for use by the playgroundS extends StrictRJSFSchema = RJSFSchema
generic and fixed up type castsAjvClass
prop to the CustomValidatorOptionsType
to support using the Ajv2019
or Ajv2020
class implementation instead of the default Ajv
class; fixing #3189rawValidation()
function for use by the playground5.x upgrade guide
and utility-functions.md
to document the new StrictRJSFSchema
, the S
generic and changing the F
generic extendvalidation
guide to document the new AjvClass
prop on CustomValidatorOptionsType
and mentioning the deprecation of @rjsf/validator-ajv6
draft-2019-09
and draft-2020-12
schemas and to make the AJV8
validator the default validator, marking AJV6
as deprecated@rjsf/validator-ajv8
validator as the defaultChangelog
5.0.0-beta.11
FieldTemplate
to no longer render additional, unnecessary white space for fields that have empty help
and extra
information, fixing #3147ArrayFieldTemplate
to always render ArrayFieldDescriptionTemplate
since that template deals with the optional description
schema
into the ArrayFieldDescriptionTemplate
, ArrayFieldTitleTemplate
, DescriptionFieldTemplate
and TitleFieldTemplate
, fixing #3176FieldTemplate
instead of having the widgets implementing the label, fixing #2007ArrayFieldTemplate
to always render ArrayFieldDescriptionTemplate
since that template deals with the optional description
schema
into the ArrayFieldDescriptionTemplate
, ArrayFieldTitleTemplate
, DescriptionFieldTemplate
and TitleFieldTemplate
, fixing #3176chakra-react-select
v4, fixing #3152SelectWidget
use Select
from chakra-react-select
for both single- and multiple-choice selectSelectWidget
multiple-choice select display label rather than value for selected itemsArrayFieldTemplate
to always render ArrayFieldDescriptionTemplate
since that template deals with the optional description
schema
into the ArrayFieldDescriptionTemplate
, ArrayFieldTitleTemplate
, DescriptionFieldTemplate
and TitleFieldTemplate
, fixing #3176Form.onChange
to optionally return the id
of the field that caused the change, fixing #2768additionalProperties
was true
(#3719).ArrayFieldDescriptionTemplate
and ArrayFieldTitleTemplate
to not render content when ui:label
is false, fixing #2535ArrayFieldTemplate
to always render ArrayFieldDescriptionTemplate
since that template deals with the optional description
schema
into the ArrayFieldDescriptionTemplate
, ArrayFieldTitleTemplate
, DescriptionFieldTemplate
and TitleFieldTemplate
, fixing #3176ArrayFieldTemplate
to always render ArrayFieldDescriptionTemplate
since that template deals with the optional description
schema
into the ArrayFieldDescriptionTemplate
, ArrayFieldTitleTemplate
, DescriptionFieldTemplate
and TitleFieldTemplate
, fixing #3176ArrayFieldTemplate
to always render ArrayFieldDescriptionTemplate
since that template deals with the optional description
schema
into the ArrayFieldDescriptionTemplate
, ArrayFieldTitleTemplate
, DescriptionFieldTemplate
and TitleFieldTemplate
, fixing #3176ArrayFieldTemplate
to always render ArrayFieldDescriptionTemplate
since that template deals with the optional description
schema
into the ArrayFieldDescriptionTemplate
, ArrayFieldTitleTemplate
, DescriptionFieldTemplate
and TitleFieldTemplate
, fixing #3176ArrayFieldTemplate
to always render ArrayFieldDescriptionTemplate
since that template deals with the optional description
schema
into the ArrayFieldDescriptionTemplate
, ArrayFieldTitleTemplate
, DescriptionFieldTemplate
and TitleFieldTemplate
, fixing #3176onChange
prop on FieldProps
and FieldTemplateProps
to add an optional id
parameter to the callback.DescriptionFieldProps
and TitleFieldProps
to add a new required schema
prop. Also updated the ArrayFieldDescriptionTemplate
and ArrayFieldTitleTemplate
to make description
and title
optional while pulling all the other props but id
from the associated type.id
of the field being changed on the onChange
handlerform-props.md
to describe the new id
parameter being returned by the Form.onChange
handlercustom-templates.md
to add the new schema
prop to the ArrayFieldDescriptionTemplate
, ArrayFieldTitleTemplate
, DescriptionFieldTemplate
and TitleFieldTemplate
documentationcontributing.md
to describe setting up the husky
precommit hooks for the first time git clone
of the repo; Also added guidance for developing on underpowered computers; Finally discussed code-coverage requirements for some packages.Changelog
5.0.0-beta.10
WrapIfAdditional
to WrapIfAdditionalTemplate
name
to the input
components that were missing it to support remix
CheckboxesWidget
and RadioWidget
to have unique id
s for each radio element by appending the option.value
, protecting against non-arraysantd
to Typescript, indirectly fixing (https://github.com/rjsf-team/react-jsonschema-form/issues/3123)WrapIfAdditional
to WrapIfAdditionalTemplate
name
to the input
components that were missing it to support remix
CheckboxWidgets
code to eliminate a ternary in favor of a simple inline={inline}
property since all the rest of the props were the sameCheckboxesWidget
and RadioWidget
to have unique id
s for each radio element by appending the option.value
, removing unnecessary casts to any
and protecting against non-arraysCheckboxesWidget
incorrectly rendered inner <form>
elements around each checkbox, fixing (https://github.com/rjsf-team/react-jsonschema-form/issues/2355)WrapIfAdditional
to WrapIfAdditionalTemplate
name
to the input
components that were missing it to support remix
CheckboxesWidget
and RadioWidget
to have unique id
s for each radio element by appending the option.value
, removing unnecessary casts to any
and protecting against non-arraysWrapIfAdditional
to WrapIfAdditionalTemplate
name
to the input
components that were missing it to support remix
CheckboxesWidget
and RadioWidget
to have unique id
s for each radio element by appending the option.value
validate()
method on Form
to make schemaUtils
an optional third parameter rather than a required first parameter, making the signature backwards compatible with what was provided in previous versions.WrapIfAdditionalTemplate
. additionalProperties
is currently not supported in @rjsf/fluent-ui
(See #2777).name
or id
(for those fluent components not supporting name) to the input
components that were missing it to support remix
DateTimeWidget
to properly use BaseInputTemplate
rather than TextWidget
CheckboxesWidget
and RadioWidget
to have unique id
s for each radio element by appending the option.value
, removing unnecessary casts and protecting against non-arrays, fixing (https://github.com/rjsf-team/react-jsonschema-form/issues/2138)RadioWidget
so that it supports read-only and disabled statesWrapIfAdditional
to WrapIfAdditionalTemplate
name
to the input
components that were missing it to support remix
CheckboxesWidget
and RadioWidget
to have unique id
s for each radio element by appending the option.value
, removing unnecessary casts to any
and protecting against non-arraysWrapIfAdditional
to WrapIfAdditionalTemplate
name
to the input
components that were missing it to support remix
CheckboxesWidget
and RadioWidget
to have unique id
s for each radio element by appending the option.value
, removing unnecessary casts to any
and protecting against non-arraysWrapIfAdditional
to WrapIfAdditionalTemplate
ArrayFieldTemplate
and ObjectFieldTemplate
's AddButton
to show the non-labeled version. (https://github.com/rjsf-team/react-jsonschema-form/pull/3142)name
to the input
components that were missing it to support remix
, including fixing incorrect name
s as id
s in some situationsCheckboxesWidget
and RadioWidget
to have unique id
s for each radio element by appending the option.value
, protecting against non-arrayssemantic-ui
to TypescriptWrapIfAdditionalTemplate
and WrapIfAdditionalTemplateProps
to simplify theming and make it easier to override Field behavior for schemas with additionalProperties
.Changelog
5.0.0-beta.9
uiSchema
appropriately to all of the IconButton
s, ArrayFieldItemTemplate
and WrapIfAdditional
components, fixing (https://github.com/rjsf-team/react-jsonschema-form/issues/3130)FieldErrorTemplate
to remove the explicit typing of the error
to string to support the two optionsTheme
to use the renamed ThemeProps
from @rjsf/core
uiSchema
appropriately to all of the IconButton
s, ArrayFieldItemTemplate
and WrapIfAdditional
components, fixing (https://github.com/rjsf-team/react-jsonschema-form/issues/3130)Theme
to use the renamed ThemeProps
from @rjsf/core
uiSchema
appropriately to all of the IconButton
s, ArrayFieldItemTemplate
and WrapIfAdditional
components, fixing (https://github.com/rjsf-team/react-jsonschema-form/issues/3130)FieldErrorTemplate
to remove the explicit typing of the error
to string to support the two optionsvalidateForm()
method on Form
, fixing (https://github.com/rjsf-team/react-jsonschema-form/issues/2755, https://github.com/rjsf-team/react-jsonschema-form/issues/2552, https://github.com/rjsf-team/react-jsonschema-form/issues/2381, https://github.com/rjsf-team/react-jsonschema-form/issues/2343, https://github.com/rjsf-team/react-jsonschema-form/issues/1006, https://github.com/rjsf-team/react-jsonschema-form/issues/246)WithThemeProps
to ThemeProps
to prevent another breaking-change by returning the type back to the name it had in version 4uiSchema
appropriately to all of the IconButton
s, ArrayFieldItemTemplate
and WrapIfAdditional
components, fixing (https://github.com/rjsf-team/react-jsonschema-form/issues/3130)ArrayField
to fall back to SchemaField
if ArraySchemaField
is not defined, fixing (https://github.com/rjsf-team/react-jsonschema-form/issues/3131)Theme
to use the renamed ThemeProps
from @rjsf/core
uiSchema
appropriately to all of the IconButton
s and ArrayFieldItemTemplate
components, fixing (https://github.com/rjsf-team/react-jsonschema-form/issues/3130)Theme
to use the renamed ThemeProps
from @rjsf/core
uiSchema
appropriately to all of the IconButton
s, ArrayFieldItemTemplate
and WrapIfAdditional
components, fixing (https://github.com/rjsf-team/react-jsonschema-form/issues/3130)Theme
to use the renamed ThemeProps
from @rjsf/core
uiSchema
appropriately to all of the IconButton
s, ArrayFieldItemTemplate
and WrapIfAdditional
components, fixing (https://github.com/rjsf-team/react-jsonschema-form/issues/3130)FieldErrorTemplate
to use the children
variation of the List.Item
that supports ReactElementuiSchema
appropriately to all of the IconButton
s, ArrayFieldItemTemplate
and WrapIfAdditional
components, fixing (https://github.com/rjsf-team/react-jsonschema-form/issues/3130)FieldErrorProps
type to make it support an array of string and ReactElementIconButtonProps
type to add uiSchema
, adding the <T = any, F = any>
generics to it and the associated ButtonTemplates
in TemplatesType
AND added uiSchema
to ArrayFieldTemplateItemType
as well, fixing (https://github.com/rjsf-team/react-jsonschema-form/issues/3130)custom-templates.md
file to add the missing asterisk to the new FieldErrorTemplate
and FieldHelpTemplate
validation.md
documentation to describe how to programmatically validate a formchakra-ui
custom uiSchema
documentation to make it clear they work on a per-field basis, fixing (https://github.com/rjsf-team/react-jsonschema-form/issues/2865)formElement
breaking-change documentation to the 5.x upgrade guide.md
ArraySchemaField
to better represent the updated implementation, fixing (https://github.com/rjsf-team/react-jsonschema-form/issues/3131)Changelog
5.0.0-beta.8
Changelog
v5.0.0-beta.6
@rjsf/validator-ajv8
to the validate_test.js
file to ensure the validation works with both validator implementationsREADME.md
to correct the package name in several places to match the actual packageREADME.md
to remove references to ajv6 validator, adding link to the utility-functions.md
in the docsREADME.md
to correct the package name in several places to match the actual packagegetDefaultFormState()
so that oneOf and anyOf default values do not always use the first option when formData contains a better option, fixing (https://github.com/rjsf-team/react-jsonschema-form/issues/2183)README.md
to correct the package name in several places to match the actual packageLocalizer
function passed as a second parameter to customizeValidator()
, fixing (https://github.com/rjsf-team/react-jsonschema-form/pull/846, and https://github.com/rjsf-team/react-jsonschema-form/issues/1195)README.md
to correct the package name in several places to match the actual packageAJV8
and AJV8_es
to the list of available validators for the playground; Using the second one will translate error messages to spanish.null
in certain cases.