I have a working example of vue-multiselect. This is working as expected with the two remaining issues.
- When you try and remove an option by clicking the x, it in fact duplicates the option, and never removes it
- The loading spinner never disappears even though I reset the isLoading var to false
Example: https://codepen.io/TheDevCoder/pen/bGVbGOG
Markup
<multiselect
v-model="value"
id="ajax"
label="full_name"
:options="store"
:multiple="true"
:loading="isLoading"
:internal-search="false"
@search-change="getData"
>
</multiselect>
Script
getData(query){
this.isLoading = true;
if(query.length > 0){
axios.get(`https://api.github.com/search/repositories?q=${escape(query)}`)
.then((res) => {
this.store = res.data.items;
this.isLoading = false;
})
.catch((error) => {
console.log(error);
this.isLoading = false;
});
}
}