mirror of
https://github.com/tenrok/vue-select.git
synced 2026-06-19 09:50:33 +03:00
Improved fix for unresponsive vue-select after clicking custom no-options to not reintroduce old IE bug (#703)
This commit is contained in:
@@ -970,10 +970,28 @@
|
|||||||
*/
|
*/
|
||||||
onSearchBlur() {
|
onSearchBlur() {
|
||||||
|
|
||||||
this.mousedown = false
|
if (this.mousedown && !this.searching) {
|
||||||
if (this.clearSearchOnBlur) {
|
this.mousedown = false
|
||||||
this.search = ''
|
} else {
|
||||||
|
if (this.clearSearchOnBlur) {
|
||||||
|
this.search = ''
|
||||||
|
}
|
||||||
|
this.closeSearchOptions()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Fixed bug where no-options message could not be closed
|
||||||
|
if(this.search.length === 0 && this.options.length === 0){
|
||||||
|
this.closeSearchOptions()
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 'Private' function to close the search options
|
||||||
|
* @emits {search:blur}
|
||||||
|
* @returns {void}
|
||||||
|
*/
|
||||||
|
closeSearchOptions(){
|
||||||
this.open = false
|
this.open = false
|
||||||
this.$emit('search:blur')
|
this.$emit('search:blur')
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user