mirror of
https://github.com/tenrok/vue-select.git
synced 2026-05-17 02:29:37 +03:00
@@ -695,7 +695,7 @@
|
||||
*/
|
||||
onAfterSelect(option) {
|
||||
if (this.closeOnSelect) {
|
||||
this.open = !this.open
|
||||
this.open = !this.open;
|
||||
this.searchEl.blur()
|
||||
}
|
||||
|
||||
@@ -1153,10 +1153,13 @@
|
||||
}
|
||||
|
||||
let options = this.search.length ? this.filter(optionList, this.search, this) : optionList;
|
||||
if (this.taggable && this.search.length && !this.optionExists(this.createOption(this.search))) {
|
||||
options.unshift(this.search)
|
||||
if (this.taggable && this.search.length) {
|
||||
const createdOption = this.createOption(this.search);
|
||||
if (!this.optionExists(createdOption)) {
|
||||
options.unshift(createdOption);
|
||||
}
|
||||
}
|
||||
return options
|
||||
return options;
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
@@ -61,12 +61,6 @@ export default {
|
||||
|
||||
if (typeAheadOption) {
|
||||
this.select(typeAheadOption);
|
||||
} else if (this.taggable && this.search.length) {
|
||||
this.select(this.createOption(this.search));
|
||||
}
|
||||
|
||||
if (this.clearSearchOnSelect) {
|
||||
this.search = "";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user