Skip to content

Commit 0d04021

Browse files
mygnurstoenescu
authored andcommitted
add filter function prop to provide custom filters to autocomplete (quasarframework#657)
1 parent 0a91a00 commit 0d04021

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/components/autocomplete/QAutocomplete.vue

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@ export default {
5454
type: Number,
5555
default: 500
5656
},
57+
filter: {
58+
type: Function,
59+
default: filter
60+
},
5761
staticData: Object,
5862
separator: Boolean
5963
},
@@ -110,7 +114,7 @@ export default {
110114
111115
if (this.staticData) {
112116
this.searchId = ''
113-
this.results = filter(terms, this.staticData)
117+
this.results = this.filter(terms, this.staticData)
114118
if (this.$q.platform.is.desktop) {
115119
this.selectedIndex = 0
116120
}

0 commit comments

Comments
 (0)