Is there a way to link multiple checkboxes from various child elements to one parent element (e.g. using a model)?
Imagine that each child component includes something like:
<input
type="checkbox"
:id="'ticket-'+id"
:checked="checked"
/>
Now, can we have a parent property called selected
that would gather the ids of all checked checkboxes from the children in an array?
{
selected: [
5,
8
]
}
The closest solution I found is this. However, I don't want to track unchecked instances in my case.