From 1b75d03733e512892cc4711b4205d517eb2cc39f Mon Sep 17 00:00:00 2001 From: Yunyu Lin Date: Sun, 21 May 2017 17:36:05 -0600 Subject: [PATCH] Reset current selection when items are reset --- dist/vue-typeahead.common.js | 1 + src/main.js | 1 + 2 files changed, 2 insertions(+) diff --git a/dist/vue-typeahead.common.js b/dist/vue-typeahead.common.js index a76e199..633bf79 100644 --- a/dist/vue-typeahead.common.js +++ b/dist/vue-typeahead.common.js @@ -100,6 +100,7 @@ exports.default = { cancel: function cancel() {}, reset: function reset() { this.items = []; + this.current = -1; this.query = ''; this.loading = false; }, diff --git a/src/main.js b/src/main.js index 461ea69..fcd0d6d 100644 --- a/src/main.js +++ b/src/main.js @@ -84,6 +84,7 @@ export default { reset () { this.items = [] + this.current = -1 this.query = '' this.loading = false },