quasarframework / quasar

Quasar Framework - Build high-performance VueJS user interfaces in record time
https://quasar.dev
MIT License
25.73k stars 3.49k forks source link

blur does not trigger for QSelect when use-input and options filtered to none #10643

Open gaby64 opened 3 years ago

gaby64 commented 3 years ago

Describe the bug blur event does not trigger when the options are filtered to none by the input, the intent here is to add the value of input on blur.

Codepen/jsFiddle/Codesandbox (required) Edit vee-validate v4 with Quasar framework (forked)

To Reproduce Steps to reproduce the behavior:

  1. enter 'test' in the job field
  2. Click out of the field
  3. notice 'blur' was not logged to the console
  4. enter just 't' in the job field (the filter will match some options)
  5. click out of the field
  6. 'blur' is logged to the console

Expected behavior @blur should be triggered regardless if there are matching options

Platform (please complete the following information): Quasar Version: 2.0.4

dalys commented 6 months ago

Just encountered the same bug.

I fixed it with setting the value of the model on input, by using @input-value.

<script setup>
const model = ref("");

const setValue = (val) => model.value = val;
</script>
<template>
<q-select ... @input-value="setValue" v-model="model" ... />
</template>