Quasar: No change event fired for q-select (v0.15-beta.7)

Created on 20 Jan 2018  路  2Comments  路  Source: quasarframework/quasar

Software version

Quasar:
OS: Mac
Node: 8.9
NPM: 5.x
Browsers: Chrome, Firefox

What did you get as the error?

The q-select component does not fire change event on selection change.

What steps did you take, to get the error?

.....
The onChange never got fired.

Most helpful comment

Hi,

v0.15 changes the events related to the model in order to match v-model and future v-model.lazy. This applies to almost all form components (QInput, QSelect, ... and so on).

So, example of v-model and also catching when model changes:

  • Option 1: <q-select v-model="model" @input="modelChanged" .... />
  • Option 2: <q-select v-model="model" ... /> + vue watcher on model

Example of lazy v-model. Will use props and events until v-model.lazy will be merged into Vue (soon):
<q-select :value="model" @change="val => model = val" ... /> Hook into @change event or add a watcher on model to detect when the model changes.

All 2 comments

Hi,

v0.15 changes the events related to the model in order to match v-model and future v-model.lazy. This applies to almost all form components (QInput, QSelect, ... and so on).

So, example of v-model and also catching when model changes:

  • Option 1: <q-select v-model="model" @input="modelChanged" .... />
  • Option 2: <q-select v-model="model" ... /> + vue watcher on model

Example of lazy v-model. Will use props and events until v-model.lazy will be merged into Vue (soon):
<q-select :value="model" @change="val => model = val" ... /> Hook into @change event or add a watcher on model to detect when the model changes.

Great answer; could be clearer in docs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Bangood picture Bangood  路  3Comments

jean-moldovan picture jean-moldovan  路  3Comments

lukadriel7 picture lukadriel7  路  3Comments

green-mike picture green-mike  路  3Comments

sskwrl picture sskwrl  路  3Comments