I'm using Boostrap and I have a sector in the form where the client will choose some items, and when clicking on the item the bootstrap adds the active class in the selected item, and with css I do the item to change color.
Getting more or less like this:
<label class="btn bg-grey active">
<input type="checkbox" name="tagslist[]" value="valor"> Titulo
</label>
I'm using vue.js to create the items dynamically through data in json. And to select the checkboxes automatically according to the open registry.
But my problem is that in vue.js when it starts by checking the items I need, it only does the checkbox, but does not add the active class to the label, thus:
<label class="btn bg-grey">
<input type="checkbox" name="tagslist[]" value="valor" checked> Titulo
</label>
How do I add this class to the parent tag of this checkbox input?