question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

q-select slots > itemEvents no longer exists in Qv2

See original GitHub issue

Hello, I am in the process of migrating an application made in Qv1 to Qv2, but I cannot find an alternative to itemEvents (Computed properties passed down to QItem).

Apparently it no longer exists on V2

example :

  <q-select
                v-model="client.rank"
                emit-value
                map-options
                :options="optionsRank"
                label="Rank"
                label-color="primary"
                option-label="label"
                option-value="value"
              >
                <template #option="scope">
                  <q-item   v-bind="scope.itemProps" v-on="scope.itemEvents">
                    <q-item-section avatar>
                      <q-icon :name="scope.opt.icon" />
                    </q-item-section>
                    <q-item-section>
                      <q-item-label v-text="scope.opt.label" />
                    </q-item-section>
                  </q-item>
                </template>
  </q-select>

the problem is here : <q-item v-bind=“scope.itemProps” v-on=“scope.itemEvents”>

i have this in debug console : [Vue warn]: v-on with no argument expects an object value.

is it enough to remove it? since the code continue to work without this v-on…

Thank you in advance for your help.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
rstoenescucommented, Apr 15, 2021

To be more clear, just remove the v-on. v-bind will take care of everything.

1reaction
rstoenescucommented, Sep 23, 2021

@eunjin0212 Remove v-on="scope.itemEvents" as its no longer needed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Developers - q-select slots > itemEvents no longer exists in Qv2 -
Hello, I am in the process of migrating an application made in Qv1 to Qv2, but I cannot find an alternative to itemEvents...
Read more >
Select | Quasar Framework
The QSelect Vue component has two types of selection - single or multiple. This component opens up a menu for the selection list...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found