Skip to content
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

Handle serialization edge cases #842

Open
pianostardom opened this issue Dec 26, 2024 · 0 comments
Open

Handle serialization edge cases #842

pianostardom opened this issue Dec 26, 2024 · 0 comments

Comments

@pianostardom
Copy link

Describe the bug and the expected behavior

Since the defaultValue object gets serialized automagically down the call stack in useForm, there exists an edge case for utility functions such as getInputProps (e.g. with types checkbox/radio) to which a user may pass a non-serialized value inadvertently.

The problem here is that e.g. the defaultChecked field will be falsy due to type mismatch (e.g. number/string, etc).

PS. For future reference to those who search issues but not discussions, here's a short overview of how serialization works: #433

Conform version

v1.2.2

Steps to Reproduce the Bug or Issue

Maybe another time?

What browsers are you seeing the problem on?

Chrome, Firefox, Microsoft Edge, Safari, Others

Screenshots or Videos

No response

Additional context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant