New utility function features
- Added new capability to the
mergeDefaultWithFormData()
utility function (see below) - Added new
experimental_defaultFormStateBehavior.arrayMinItems.mergeExtraDefaults
flag which caused a breaking change to the experimentalarrayMinItems
feature (see below):- If you were previously passing
experimental_defaultFormStateBehavior
as{ arrayMinItems = 'requiredOnly }
on theForm
, now you would pass{ arrayMinItems: { populate: 'requiredOnly' } }
- If you were previously passing
@rjsf/utils
- Updated
getDefaultFormState()
to fix a bug whereexperimental_defaultFormStateBehavior: { emptyObjectFields: 'populateRequiredDefaults' }
wasn't working for object properties with$ref
s - Experimental feature breaking change:
- Updated the
experimental_defaultFormStateBehavior.arrayMinItems
from simple flag to an object containing two optional fields,populate
andmergeExtraDefaults
- The new
arrayMinItems.mergeExtraDefaults
flag, when "true", allows users to merge defaults onto the end offormData
arrays whenminItems
is specified
- The new
- Updated the
- Added a new, optional
mergeExtraArrayDefaults=false
flag to themergeDefaultWithFormData()
utility function to support the newarrayMinItems.mergeExtraDefaults
experimental feature
Dev / docs / playground
- Updated the
utility-functions
documentation to add the newmergeExtraArrayDefaults
flag for themergeDefaultWithFormData()
function - Updated the
form-props
documentation to update thearrayMinItems
documentation for the new object behavior - Updated the
playground
to add a checkbox for the newarrayMinItems.mergeExtraDefaults
flag