2
0
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:
Marek Meyer
2018-11-17 11:45:57 +01:00
parent 17c06c08b0
commit cacacfc5a8
+22 -4
View File
@@ -969,11 +969,29 @@
* @return {void} * @return {void}
*/ */
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')
}, },