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

boolean values not being serialized correctly with intent buttons #638

Closed
lifeiscontent opened this issue May 13, 2024 · 1 comment · Fixed by #648
Closed

boolean values not being serialized correctly with intent buttons #638

lifeiscontent opened this issue May 13, 2024 · 1 comment · Fixed by #648

Comments

@lifeiscontent
Copy link
Contributor

Describe the bug and the expected behavior

using form.insert.getButtonProps({name, defaultValue, index}) if the defaultValue has a boolean in it, it seems to be thrown away

Conform version

v1.0.3

Steps to Reproduce the Bug or Issue

  1. create a schema with a boolean attribute (this may be something specific to a nested object, so might need to try with that)
  2. use intent button API, I personally saw issues with form.insert.getButtonProps()
  3. witness the bug by console.log(form.value)

What browsers are you seeing the problem on?

Chrome

Screenshots or Videos

No response

Additional context

Let me know if you need more specifics, but these serialization bugs are rough

@jdupont22
Copy link

I've the same issue with number, when inserting a defaultValue in a array of any nested object.

For exemple, insert a default value in an Array<{id: number, title: string}.

form.insert.getButtonProps({name, {id: 3, title: 'foo'}})

the 'title' attribute will be equals to 'foo' but the id is missing.

Conform version
v1.1.3

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

Successfully merging a pull request may close this issue.

2 participants