diff --git a/dist/vue-typeahead.common.js b/dist/vue-typeahead.common.js index a76e199..1e6e3d1 100644 --- a/dist/vue-typeahead.common.js +++ b/dist/vue-typeahead.common.js @@ -37,6 +37,9 @@ exports.default = { hasItems: function hasItems() { return this.items.length > 0; }, + noItems: function noItems() { + return this.items.length == 0 && this.query.length >= this.minChars && this.loading == false && this.current == -1; + }, isEmpty: function isEmpty() { return !this.query; }, diff --git a/src/main.js b/src/main.js index 461ea69..abdbaa3 100644 --- a/src/main.js +++ b/src/main.js @@ -17,6 +17,10 @@ export default { return this.items.length > 0 }, + noItems () { + return this.items.length == 0 && this.query.length >= this.minChars && this.loading == false && this.current == -1 + }, + isEmpty () { return !this.query },