I am using vue-multiselect to display a multi select dropdown list on UI in vue js. It is present in component section of vue extension by browser, CSS is also present in inspect element, but multiselect dropdown is not getting rendered on the UI. Below is my html and js code, and there is no error in console.
HTML code
<multiselect
v-model="pincodeone"
tag-placeholder="Add this as new tag"
tag-position="bottom"
placeholder="Enter the pincode(s)"
label="name"
:options="options"
:multiple="true"
:taggable="true"
@tag="PincodeTag"
@remove="RemoveTag"
></multiselect>
Js code
import Multiselect from 'vue-multiselect';
import 'vue-multiselect/dist/vue-multiselect.min.css';
export default {
name: "test",
components: { Multiselect },
props: [],
data() {
return { options: [], pincodeone: [], pincodetwo: [] };
},
methods: {
PincodeTag(newTag) {
const tag = { name: newTag };
this.options.push(tag);
this.pincodeone.push(tag);
this.pincodetwo.push(newTag);
},
RemoveTag({ name }) {
const index = this.pincodetwo.indexOf(name);
if (index > -1) {
this.pincodetwo.splice(index, 1);
this.options.splice(index, 1);
}
},
}; }}}}
package.json file
"vue-multiselect": "^2.1.6",