2
0
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:
Jeff Sagal
2017-03-16 15:38:40 -07:00
parent 5470adbbd6
commit 546418da1f
2 changed files with 52 additions and 8 deletions
+5 -4
View File
@@ -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
}
}
}