New feature
- We added
CyclicSchemaFieldandCyclicSchemaExpandTemplateto prevent infinite cyclic expansion of schemas. If you want to override the UI for this, you can customize your ownCyclicSchemaExpandTemplate - Added new nestedDefaultPrecedence option to
experimental_defaultFormStateBehavior
@rjsf/antd
- Added
CyclicSchemaExpandTemplateto the list of templates for the theme, updating snapshots accordingly - Show selected option descriptions, fixing (#4214)
@rjsf/chakra-ui
- Added
CyclicSchemaExpandTemplateto the list of templates for the theme, updating snapshots accordingly - Show selected option descriptions, fixing (#4214)
@rjsf/core
- Fixed #3907 and #4262 as follows:
- Added
CyclicSchemaExpandTemplateto the list of templates for the theme, updating snapshots accordingly - Added
CyclicSchemaFieldto the list of fields, that renders theCyclicSchemaExpandTemplateinitially and, if expanded, will render theSchemaFieldwith theRJSF_REF_CYCLE_KEYtag turned off - Updated
SchemaFormto render theCyclicSchemaFieldwhen the schema contains theRJSF_REF_CYCLE_KEYset totrue
- Added
- Fixed array fields with empty tuple
itemsand schema-valuedadditionalItemsso clicking add renders the additional item field, fixing #3791 - Added a warning when a
selectwidget schema default is not present in the enum options, fixing #4494 - Fixed
SchemaFieldso that a schema with a primitive or arraytypealongside a non-selectoneOf/anyOfno longer renders a spurious duplicate input above the option selector, fixing #5119 - Fixed
MultiSchemaFieldto propagate the parent schema'stypeto option sub-schemas that don't define their own, so the correct widget (e.g.StringField) renders for the selected option instead ofFallbackField, fixing #5119 - Fixed nested
constAsDefaultsvalues being skipped in matching conditionalallOfschemas, fixing #4963 - Fixed
processPendingChangeso that clearing a string field that has a schemadefaultvalue no longer re-applies the default, fixing #5125 - Fixed a regression introduced in #5136 where clearing a second field caused a previously-cleared field to be re-populated with its schema default; uses
JSON.parse(JSON.stringify(...))to stripundefined-valued keys from formData before AJV validation so that the #4518 fix is preserved - Show selected option descriptions, fixing (#4214)
- Fixed
ObjectField's "Add" button foradditionalPropertiesschemas containing a$refso the new item's default value is computed viagetDefaultFormState()against the fully-resolved referenced schema (recursively populating nested defaults) instead of only reading the resolved schema's own top-leveldefault, which discarded the siblingdefaultand any nested property defaults, fixing #4266
@rjsf/daisyui
- Added
CyclicSchemaExpandTemplateto the list of templates for the theme, updating snapshots accordingly - Show selected option descriptions, fixing (#4214)
@rjsf/fluentui-rc
- Added
CyclicSchemaExpandTemplateto the list of templates for the theme, updating snapshots accordingly - Show selected option descriptions, fixing (#4214)
@rjsf/mantine
- Added
CyclicSchemaExpandTemplateto the list of templates for the theme, updating snapshots accordingly - Show selected option descriptions, fixing (#4214)
@rjsf/mui
- Added
CyclicSchemaExpandTemplateto the list of templates for the theme, updating snapshots accordingly - Show selected option descriptions, fixing (#4214)
@rjsf/primereact
- Added
CyclicSchemaExpandTemplateto the list of templates for the theme, updating snapshots accordingly - Show selected option descriptions, fixing (#4214)
@rjsf/react-bootstrap
- Added
CyclicSchemaExpandTemplateto the list of templates for the theme, updating snapshots accordingly - Show selected option descriptions, fixing (#4214)
@rjsf/semantic-ui
- Added
CyclicSchemaExpandTemplateto the list of templates for the theme, updating snapshots accordingly - Show selected option descriptions, fixing (#4214)
@rjsf/shadcn
- Updated the single select trigger to use native button semantics with expanded and disabled state coverage, fixing #4764 (#5117)
- Added
CyclicSchemaExpandTemplateto the list of templates for the theme, updating snapshots accordingly - Fixed a small visual bug that caused hovering over items of
FancySelectandFancyMultiSelectthat have the same label to incorrectly highlight more than one element, fixing #5126 - Fixed
CommandItemvalue handling inFancySelectandFancyMultiSelectcomponents to ensure values are passed as strings (#5155) - Show selected option descriptions, fixing (#4214)
@rjsf/utils
- Updated
types.tsto addCyclicSchemaExpandPropstype andCyclicSchemaExpandTemplatein theTemplatesType - Updated
resolveAllReferences()to add a newmarkCycleOnDetectionprop which addsRJSF_REF_CYCLE_KEYmarker (fromconstants.ts) to a schema that has been detected to have a cycle, partially fixing #3907 - Updated
hashForSchema()to filter keys to removeRJSF_REF_KEYprefixed keys before hashing the schema - Updated
enums.tsto addExpandButtonandCycleDetectedkeys - Updated
isFixedItems()to treat empty tupleitemsarrays as fixed items soadditionalItemsschemas are handled consistently, fixing #3791 - Added
logUnsupportedDefaultForEnum()helper for theme select widgets to warn when a schema default is not present in the enum options, fixing #4494 - Fixed
retrieveSchema()to preserve boolean conditional branches while resolving schemas, fixing #4476 (#5101) - Updated
Experimental_DefaultFormStateBehaviorto add a newnestedDefaultsPrecedenceoption - Updated
getDefaultFormState()to use the newnestedDefaultsPrecedenceoption to control how defaults defined on multiple levels are merged together, fixing #5089 - Updated
omitExtraData()to better handleallOfs containing multipleif/then/elseblocks, matching fix inSJSF, fixing #5142 - Fixed
optionsList()to preserve an explicitly empty stringtitleononeOf/anyOfoptions instead of falling back to the option's value, fixing #4448 - Show selected option descriptions, fixing (#4214)
- Fixed
getDefaultFormState()so that optional array defaults are not initialized whenexperimental_defaultFormStateBehavior.arrayMinItems.populate = never, fixing #5149
@rjsf/validator-ajv8
- Updated
transformRJSFValidationErrors()to detect field name forallOfandif-then-elseby falling back to the root schema to find the title, fixing #5134
@rjsf/validator-ata
- Updated
transformRJSFValidationErrors()to detect field name forallOfandif-then-elseby falling back to the root schema to find the title, fixing #5134 - Updated the
ata-validatordependency to^1.0.0, its first stable release; no API changes for@rjsf/validator-ataconsumers (#5157)
Dev / docs / playground
- Updated
@rjsf/snapshotsto add a test case toformTeststhat verifies the new Cycle detection UI - Updated the
custom-templates.mdandcustom-widgets-fields.mdfor the new feature - Updated
utility-functions.mdto documentlogUnsupportedDefaultForEnum() - Updated the playground to add a selector for the
nestedDefaultsPrecedenceoption - Replaced npm with pnpm v10 for development