fix(enhancedOnChange): handle empty string clearedValue and update tests#1517
Open
mohith2883 wants to merge 1 commit intodata-driven-forms:masterfrom
Open
Conversation
|
@mohith2883 is attempting to deploy a commit to the data-driven-forms Team on Vercel. A member of the Team first needs to authorize it. |
Author
Member
|
@mohith2883, there are a few tests that are failing. Can you address these? |
Hyperkid123
requested changes
Oct 13, 2025
Member
Hyperkid123
left a comment
There was a problem hiding this comment.
Based on the failing tests, I think we need a little bit more investigation to ensure we are not introducing regressions.
| } | ||
|
|
||
| if (checkEmpty(result) && typeof initial !== 'undefined') { | ||
| if (checkEmpty(result)) { |
Member
There was a problem hiding this comment.
I am not sure if this is going to solve the issue without breaking existing behavior. I think we need to look at where the clearedValue is set/retrieved from, and if it really has the "" value when the onChange is called.
a3c287c to
2f9f5a6
Compare
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.
Fixes #1513
Description
Enhances
onChangehandling to correctly supportclearedValue: ""as a valid value instead of treating it asundefined. Ensures cleared fields with empty strings remain ingetState().values. Corresponding tests updated.Checklist: (please see documentation page for more information)
Yarn buildpassesYarn lintpassesYarn testpassesfix|feat({scope}): {description}fix(pf3): wizard correctly handles next buttonFix button on documenation example page