Reputation: 37
I am using package "vue-search-select"
https://www.npmjs.com/package/vue-search-select
I want to add a static option on selection that won't be filtered
I didn’t find any properties in the library for such a condition, so I tried to do it through the filterPredicate
but the documentation says that it accepts a regular string, the program requires the function
maybe someone faced such a problem? how can you decide?
Upvotes: 0
Views: 168
Reputation: 37
return (text, inputText) => {
if(text === ('static_text')) {
return text;
}
return text.match(escapedRegExp(inputText));
}
I didn’t find the built-in functionality in the library in new versions, I had to fantasize a little with the existing properties, one of the working options is to disable filtering by specific text
Upvotes: 0