You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For what version of Nuxt UI are you suggesting this?
v3.x
Description
For Form the example about nesting forms doesnt fully work out:
When activating the checkbox and adding an email, and then deactivating the checkbox, the email stays in the state object.
When submitting with checkbox activated and email inserted, the email is not part of the submit data.
There is a small issue: news is a require boolean, therefor the form never submits when the checkbox has not been touched. Should be: news: z.boolean().default(false)
Btw. I think an example about nesting forms is very important because it is a common tasks to have compose a form out of multiple components. BUT maybe another example could be added because the same can be archived with a single schema and descrimination union:
The missing data from the submit payload is a regression introduced with this PR that apply transformations on the state before calling the @submit callback. We're missing a part to get transformations from nested payloads. I'll look into a solution!
For what version of Nuxt UI are you suggesting this?
v3.x
Description
For
Form
the example about nesting forms doesnt fully work out:news
is a requireboolean
, therefor the form never submits when the checkbox has not been touched. Should be:news: z.boolean().default(false)
Btw. I think an example about nesting forms is very important because it is a common tasks to have compose a form out of multiple components. BUT maybe another example could be added because the same can be archived with a single schema and descrimination union:
Maybe this would be even a better solution for the checkbox use case. It should fix #1 and #2, but it doesnt work for nested forms this way.
Additional context
No response
The text was updated successfully, but these errors were encountered: