1

I use vue-select and I need to trigger the option open event, I tried:

<v-select :filterable="false" onclick="this.customMethod('meow')" /> but this not support vue methods.

3 Answers3

0

If your method customMethod() is in the same code page (in METHOD part) than your line, call it without this. before method. And onclick is @click="..." or v-on:click="..."

So just @click="myMethod"

zerbene
  • 1,249
  • 2
  • 7
  • 21
0

Use @change='meow()'

and include meow in your methods

berkobienb
  • 639
  • 5
  • 12
0

Try something like that:

<v-select :filterable="false" @search:focus="customMethod('meow')" />

If you want to see all events suported, click here.

For example, you want to dispatch event on element is clicked, you must to use @search:focus event.

If you want dispatch event on element is changed, you must to use @input event.

Gabriel Willemann
  • 1,871
  • 1
  • 6
  • 11