I'm struggling to get the select filter to work properly in my Quasar application. When I open the select, there is no list displayed and no value gets selected. Can someone help me understand why it's not working?
<q-select
v-model="model"
use-input
:options="regionsOptions"
@filter="filterFn"
>
</q-select>
export default {
data() {
return {
model: '',
regions: [
{
"label": "Help",
"value": "help",
"lat": 57.6215477,
"lon": 39.8977411
},
{
"label": "Hello",
"value": "hello",
"lat": 57.6215477,
"lon": 39.8977411
}
],
regionsOptions: [],
}
},
methods: {
filterFn(val) {
const needle = val.toLowerCase()
this.regionsOption = this.regions.filter((v) => v.value.toLowerCase().indexOf(needle) > -1)
},
}
}
</script>