Repository navigation
fix(handleSubmit): accept nullish outputs with disabled fields - #13999
Merged
Merged
Conversation
Skip disabled-field cleanup when a resolver returns null or undefined so the submit callback and form state complete normally. Preserve disabled-field removal for object outputs.
Verify null and undefined transformed data reaches onValid, callback return values and submit state complete, and disabled object fields are still omitted without mutating the resolver output.
bluebill1049
approved these changes
Nov 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Proposed Changes
A resolver's transformed value can be
nullorundefined. When a field is registered withdisabled: true,handleSubmittries to remove that field from the nullish result. This throws beforeonValidruns and prevents submit state from completing.Skip disabled-field cleanup for a top-level nullish result. Pass the transformed value through unchanged and preserve the existing cleanup behavior for object results.
Add three cases covering null/undefined outputs, callback return values and completed submit state, plus top-level/nested disabled-field removal without mutating the resolver's original object. The two nullish cases fail against the original implementation.
Validation with Node 22:
Type of change
Checklist: