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

Checkboxes not biding with useForm #4493

Closed
2 of 5 tasks
jermashley opened this issue Oct 4, 2023 · 3 comments · Fixed by #4497
Closed
2 of 5 tasks

Checkboxes not biding with useForm #4493

jermashley opened this issue Oct 4, 2023 · 3 comments · Fixed by #4497
Labels
✨ enhancement a "nice to have" feature ☔ has workaround this issue has a workaround 🛳 In PR This issue is being addressed in a PR

Comments

@jermashley
Copy link

What happened?

Using a checkbox with defineInputBinds does not set values in the useForm values object. You can see a reproduction here: https://stackblitz.com/edit/27ha4d?file=src%2FApp.vue. Unless I'm doing something completely wrong, I believe this is following the docs.

Reproduction steps

...

Version

Vue.js 3.x and vee-validate 4.x

What browsers are you seeing the problem on?

  • Firefox
  • Chrome
  • Safari
  • Microsoft Edge

Relevant log output

No response

Demo link

https://stackblitz.com/edit/27ha4d?file=src%2FApp.vue

Code of Conduct

@logaretm logaretm added the ✨ enhancement a "nice to have" feature label Oct 6, 2023
@logaretm
Copy link
Owner

logaretm commented Oct 7, 2023

This is a big limitation with the defineInputBinds API, even if it works for one input, it won't work for multiple ones and I need some time to think about how to solve this.

As a workaround, useFieldModel or useField should do the trick.

@logaretm logaretm added the ☔ has workaround this issue has a workaround label Oct 7, 2023
@jermashley
Copy link
Author

Yep, sounds good. I used the useFieldModel for this one. I appreciate the reply!

@logaretm
Copy link
Owner

This will be fixed with #4497 as it uses v-model API to integrate stuff so it should work for checkboxes.

@logaretm logaretm added the 🛳 In PR This issue is being addressed in a PR label Nov 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ enhancement a "nice to have" feature ☔ has workaround this issue has a workaround 🛳 In PR This issue is being addressed in a PR
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants