-
Notifications
You must be signed in to change notification settings - Fork 108
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
Initial value should not be undefined #802
Comments
Actually, this seems like a problem with |
Digging deeper, it looks like it is specific to empty string value. If I set
it behaves as expected. It is only when |
What you see is a side effect of conform normalising the default value for the ease of dirty checking. 😅 This means empty value and empty array are always transformed to undefined. I do plan to fix this. But I am afraid some people might have already relied on such behaviour. So I am leaning towards fixing it in the next major version instead. |
@edmundhung any ideas on when that work might happen? just ran into this today 😅 |
I'm facing this same problem with a checkbox/switch field being initialized with |
Describe the bug and the expected behavior
Conform version
v1.2.2
Steps to Reproduce the Bug or Issue
This prints:
The first couple of
undefined
value are unexpected, since the value of the input is known from the start (it is set indefaultValue
).What browsers are you seeing the problem on?
Chrome
Screenshots or Videos
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: