-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
useField type=checkbox does not work properly with v-model #3997
Comments
Not a bug, groups like checkboxes must be wrapped in a https://stackblitz.com/edit/vee-validate-v4-custom-checkboxes-xecm3v?file=src%2FApp.vue,package.json |
Yes, it can work but not as a group because it has no idea it is part of a group of checkboxes. a form component/composable provides that context. Basically, let's say you have the following example:
How should that field set the model value? should it set it to So a form fixes that by telling the field it has no other siblings with the same name so it should set the value to |
@logaretm But now Field works with array! Only useField cannot https://stackblitz.com/edit/vee-validate-v4-custom-checkboxes-slltaj?file=src%2FApp.vue And it works like native Vue3 |
@logaretm I understand how to do it.
|
What happened?
v-model not work properly with custom checkboxes in Your example.
https://vee-validate.logaretm.com/v4/examples/custom-checkboxes/
Expected array with choosed values, but get one value
Version
Vue.js 3.x and vee-validate 4.7.2
What browsers are you seeing the problem on?
Demo link
https://stackblitz.com/edit/vee-validate-v4-custom-checkboxes-fdbcgh?file=src%2FApp.vue
Code of Conduct
The text was updated successfully, but these errors were encountered: