@rjsf/antd
Advanced tools
Changelog
5.13.1
ArrayField
to move errors in the errorSchema when the position of array items changes for the insert and copy cases.Grid
container component in the ArrayFieldTemplate
component that wrapped the ArrayFieldItemTemplate
, fixing #3863SelectWidget
switches from controlled to uncontrolled when enumOptions
does not include a value, fixing #3844Grid
container component in the ArrayFieldTemplate
component that wrapped the ArrayFieldItemTemplate
, fixing #3863SelectWidget
switches from controlled to uncontrolled when enumOptions
does not include a value, fixing #3844getOptionMatchingSimpleDiscriminator()
functiongetMatchingOption
and getClosestMatchingOption
now bypass validator.isValid()
calls when simple discriminator is provided, fixing #3692FieldTemplateProps['onChange']
retrieveSchema()
to properly resolve references inside of properties
and array items
while also dealing with recursive $ref
s, fixing #3761
schemaParser()
and getClosestMatchingOption()
to pass the new recursiveRef
parameter added to internal retrieveSchema()
APIs100%
test coverage that was lost when updating to Jest 29
getDefaultFormState()
to remove an unnecessary check for formData
being an object since it is always guaranteed to be one, thereby allowing full testing coveragegetSchemaType()
to return the first schema type
when it is an array not containing 'null'
, fixing #3875validator
and precompiledValidator
tests to the restore 100%
coverage that was lost when updating to Jest 29
isValid()
for the validator
commenting out an if condition that was preventing 100%
coverage, with a TODO to fix it later@types/jest
as a global devDependency
so that developer tools properly recognize the jest function typesChangelog
5.13.0
StyleProvider
from @ant-design/cssinjs
. They need not have to install this package, its a transitive package coming from antd.import { StyleProvider } from '@ant-design/cssinjs';
const Component = () => {
return (
<StyleProvider>
<YourFormComponents />
</StyleProvider>
);
};
MultiSchemaField
to only merge top level required field fixing duplicate field and description.validateForm()
) removes previous errors if all data is now valid.isMultiple
option in MultiSchemaField
. It no longer offers multiple choice inside a select field in a oneOf
case in Chakra UI, fixing #3848Changelog
5.12.1
AJV8PrecompiledValidator.rawValidation()
to resolve root schema with formData when comparing input schema, fixing #3825MultiSchemaField
to merge all top level fields except properties for anyOf/oneOf options, fixing #3808 and #3787retrieveSchemaInternal
allOf logic for precompiled schemas to resolve top level properties fixing #3817Changelog
5.12.0
experimental_defaultFormStateBehavior = { arrayMinItems: { populate: 'never' } }
(feature #3796)compileSchemaValidatorsCode
to allow creating precompiled validator without a file. This is useful in case when precompiled validator is to be created dynamically. #3793dts-cli
to use individual dev tools directly, updating package publish config
form-props
documentation arrayMinItems
, added description for never
.playground
to add the option for the new arrayMinItems.populate = 'never'
.Changelog
5.11.2
@types/material-ui
which can cause typescript issues in some situationsresolveAllReferences()
function to use object spreading to update properties and items in a schema rather than directly modifying the schema to avoid issues with frozen object, fixing #3805Changelog
5.11.1
SchemaField
to ignore errors for anyOf
/oneOf
parent schema, fixing 1295resolveAllReferences()
function to resolve all references within a schema's properties and array items.getClosestMatchingOption()
to use resolveAllReferences()
for all oneOf/anyOf schemasresolveAnyOrOneOfSchemas()
to use resolveAllReferences()
for all oneOf/anyOf schemasnull
case in withIdRefPrefix
, fixing #3792Changelog
5.10.0
getFieldComponent()
to support rendering a custom component by given schema id ($id). #3740MultiSchemaField
to merge the selected oneOf/anyOf
value into base schema
, fixing #3744getClosestMatchingOption()
to resolve refs in options before computing the closest matching option, fixing an issue with using precompiled validators
anyOf
and discriminator
support in the recursive calculateIndexScore()
getDefaultFormState()
to merge the remaining schema into anyOf/oneOf
schema selected during the computation of values, fixing #3744retrieveSchema()
to merge the remaining schema into the anyOf/oneOf
schema selected during the resolving of dependencies, fixing #3744Changelog
5.9.0
getDefaultFormState()
to fix a bug where experimental_defaultFormStateBehavior: { emptyObjectFields: 'populateRequiredDefaults' }
wasn't working for object properties with $ref
sexperimental_defaultFormStateBehavior.arrayMinItems
from simple flag to an object containing two optional fields, populate
and mergeExtraDefaults
arrayMinItems.mergeExtraDefaults
flag, when "true", allows users to merge defaults onto the end of formData
arrays when minItems
is specifiedexperimental_defaultFormStateBehavior
as { arrayMinItems = 'requiredOnly }
on the Form
, now you would pass { arrayMinItems: { populate: 'requiredOnly' } }
mergeExtraArrayDefaults=false
flag to the mergeDefaultWithFormData()
utility function to support the new arrayMinItems.mergeExtraDefaults
experimental featureutility-functions
documentation to add the new mergeExtraArrayDefaults
flag for the mergeDefaultWithFormData()
functionform-props
documentation to update the arrayMinItems
documentation for the new object behaviorplayground
to add a checkbox for the new arrayMinItems.mergeExtraDefaults
flag