diff --git a/src/components/VueBootstrapTypeahead.vue b/src/components/VueBootstrapTypeahead.vue index ead6350..ad98886 100644 --- a/src/components/VueBootstrapTypeahead.vue +++ b/src/components/VueBootstrapTypeahead.vue @@ -33,6 +33,7 @@ :background-variant="backgroundVariant" :text-variant="textVariant" :minMatchingChars="minMatchingChars" + :showAll="showAll" @hit="handleHit" > @@ -93,7 +94,12 @@ export default { }, placeholder: String, prepend: String, - append: String + append: String, + showAll: { + type: Boolean, + default: false + }, + }, computed: { diff --git a/src/components/VueBootstrapTypeaheadList.vue b/src/components/VueBootstrapTypeaheadList.vue index f404987..b4df700 100644 --- a/src/components/VueBootstrapTypeaheadList.vue +++ b/src/components/VueBootstrapTypeaheadList.vue @@ -56,7 +56,11 @@ export default { minMatchingChars: { type: Number, default: 2 + }, + showAll: { + type: Boolean } + }, computed: { @@ -81,7 +85,7 @@ export default { return [] } - const re = new RegExp(this.escapedQuery, 'gi') + const re = new RegExp(this.showAll ? "" : this.escapedQuery, "gi"); // Filter, sort, and concat return this.data