Reputation: 35
so im having an error on VUE-MULTISELECT
this is my code
<b-modal id="skills">
<div>
<label class="typo__label">Tagging</label>
<multiselect v-model="value" tag-placeholder="Add this as new tag" placeholder="Search or add a tag" label="name" track-by="code" :options="options" :multiple="true" :taggable="true" @tag="addTags"></multiselect>
</div>
<template #modal-footer="{cancel}">
<b-button @click="cancel()" size="sm" variant="success">
Add Info
</b-button>
</template>
</b-modal>
this is my code on methods
addTags(newTag) {
const tag = {
name: newTag,
code: newTag.substring(0, 2) + Math.floor((Math.random() * 10000000))
}
this.options.push(tag)
this.value.push(tag)
},
this the code on my data
value: [],
options: [
{ name: 'Vue.js', code: 'vu' },
{ name: 'Javascript', code: 'js' },
{ name: 'Open Source', code: 'os' },
],
and it give me this error
app.js:117759 TypeError: Cannot read property '_wrapper' of undefined
Upvotes: 0
Views: 2680
Reputation: 35
Thanks for the response and sorry for the trouble. so the problem was that i mispelled one of my methods i have a button that has a @click="contacts" but my method name is only contact. i dont know why it affected the multiselect though, but its working now thanks again
Upvotes: 1