In my data binding, there is a string that reads as follows:
bc-men,bc-men-fashion,bc-men-underwear
I want to create an input field where I can enter "bc-some-category"
, click "Add", and have it appended to the end of the list with a comma in front.
Here is what my markup looks like:
<div class="js-referencing-categories">{{ product.refrencing_category_ids }}</div>
<input class="" required type="text" name="fname">
<button class="" v-on:click="product.refrencing_category_ids.add.value">
Add
</button>
I'm wondering how I can achieve this functionality in vueJS as I couldn't find any specific documentation on it in the guide.