Answer the question
In order to leave comments, you need to log in
How to make checkbox component work with boolean and array?
I'm trying to make a simple checkbox wrapper. A simple true / false was given without problems, but what about when you need to pass non-Boolean values in a loop and push the marked ones into the selected array?
https://codepen.io/anon/pen/bPyYmr
_ so that component usage looks like
<v-checkbox
v-model="selected"
v-for="a in array"
:key="a.id"
:label="a.name"
/>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question