Hello ,
I have a select2 field where I can choose a option. When I select a new one, the old one doesn’t erase. They just Keep getting more and more.
This is the code:
<select2 type="text" v-on:input="updateBereiche" :options="bereiche" class="form-control" id="bereichsauswahl" multiple=false>
And this:
` methods: {
updateBereiche: function(value) {
value = $(’#bereichsauswahl’).select2(‘data’);
console.log(value);
this.$store.commit(‘setBereichInput’, value.id)
}
}`
Can someone tell me what the promblem is?