-
Notifications
You must be signed in to change notification settings - Fork 93
fix(enhancedOnChange): handle empty string clearedValue and update tests #1517
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
fix(enhancedOnChange): handle empty string clearedValue and update tests #1517
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. |
@mohith2883, there are a few tests that are failing. Can you address these?
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Fixes #1513
Description
Enhances
onChange
handling 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 build
passesYarn lint
passesYarn test
passesfix|feat({scope}): {description}
fix(pf3): wizard correctly handles next button
Fix button on documenation example page