fix: Allow formData
to be optional everywhere
#3395
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Reasons for making this change
Fixes #3305 by ensuring that
formData
can be optional everywhereThere were some types which were requiring
formData
to be required even though it really can be optional everywhere@rjsf/utils
, updated theformData
prop in all types where it was required to make it optionalformData
optional@rjsf/validator-ajv6
and@rjsf/validator-ajv8
, updated places whereformData
was required as a function parameter to make it optional instead@rjsf/core
, updated places whereformData
was required as a function parameter to make it optional insteadutility-functions.md
, updated the documentation of optional parameters without default values to ensure they included| undefined
in the type of the parameter5.x upgrade guide.md
, updated the note about improved typescript typing in@rjsf/utils
to indicate that it may require updating typing in the user's implementationsCHANGELOG.md
accordinglyChecklist
npm run test:update
to update snapshots, if needed.