You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fixed a schema prop change being silently dropped when it adds a property with a default, either as the parent's reply to onChange or at any point after a change to an uncontrolled form. The guard that keeps a oneOf/anyOf option switch from reverting now only applies when the form re-derives its own formData (an uncontrolled form, or a parent holding what onChange emitted, including when it reshaped the emitted value by spreading it, storing undefined as null or round-tripping it through JSON) with the same schema and experimental_defaultFormStateBehavior, and it keeps only that formData rather than dropping the rest of the prop update, fixing #5294
Fixed switching between oneOf/anyOf options keeping a value the previous option's default put there, so a property whose value still matches that default, or a whole option that does, now picks up the new option's default the way a scalar property already did, and switching back to an option restores its own defaults. A property the new option cannot hold as it stands now picks the new default up as well instead of arriving empty — one whose type differs between the options, or a readOnly one edited away from its default. Values are compared whole, so a nested object the user has partly edited keeps the rest of the old option's defaults, and a value equal to the old default is replaced no matter who supplied it, including one passed in formData, since the two cannot be told apart, fixing #4476
@rjsf/utils
Updated Experimental_DefaultFormStateBehavior to add a new requiredBooleanDefault option, and updated getDefaultFormState() to honor it: skip turns off the false populated for a required boolean with no default (introduced in 6.9.0 by #5170), so a form that models an unanswered boolean as its own state can keep it undefined and let required report it. The default, populateFalse, keeps the 6.9.0+ behavior
@rjsf/validator-ata
Updated ata-validator from ^1.7.1 to ^1.23.0, picking up the corrected error shape for unevaluatedProperties (the error now carries params.unevaluatedProperty), the removal of a quadratic in additionalProperties: false schemas with many properties, a fix for a hang on truncated JSON input, and enforced strict-mode schema checks (#5293)
Dev / docs / playground
Documented the requiredBooleanDefault option in form-props.md and internals.md, and added a selector for it to the playground