mirror of
https://github.com/tenrok/vue-select.git
synced 2026-06-16 09:10:33 +03:00
- fix variable reference (showLoading should have been mutableLoading) in ajax mixin and specs
- add `search` event fired at same time as callback
This commit is contained in:
+5
-4
@@ -33,9 +33,10 @@ module.exports = {
|
||||
* invoke the onSearch callback.
|
||||
*/
|
||||
search() {
|
||||
if (this.search.length > 0 && this.onSearch) {
|
||||
if (this.search.length > 0) {
|
||||
this.onSearch(this.search, this.toggleLoading)
|
||||
}
|
||||
this.$emit('search', this.search, this.toggleLoading)
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
@@ -49,9 +50,9 @@ module.exports = {
|
||||
*/
|
||||
toggleLoading(toggle = null) {
|
||||
if (toggle == null) {
|
||||
return this.showLoading = !this.showLoading
|
||||
return this.mutableLoading = !this.mutableLoading
|
||||
}
|
||||
return this.showLoading = toggle
|
||||
return this.mutableLoading = toggle
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user