Skip to content
This repository has been archived by the owner on Jul 26, 2022. It is now read-only.

Add showAll option to show all data #45

Open
wants to merge 2 commits into
base: Development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/components/VueBootstrapTypeahead.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
:background-variant="backgroundVariant"
:text-variant="textVariant"
:minMatchingChars="minMatchingChars"
:showAll="showAll"
@hit="handleHit"
>
<!-- pass down all scoped slots -->
Expand Down Expand Up @@ -93,7 +94,12 @@ export default {
},
placeholder: String,
prepend: String,
append: String
append: String,
showAll: {
type: Boolean,
default: false
},

},

computed: {
Expand Down
6 changes: 5 additions & 1 deletion src/components/VueBootstrapTypeaheadList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,11 @@ export default {
minMatchingChars: {
type: Number,
default: 2
},
showAll: {
type: Boolean
}

},

computed: {
Expand All @@ -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
Expand Down