Vuetify: [Bug Report] v-select events don't provide event object

Created on 28 Feb 2018  路  2Comments  路  Source: vuetifyjs/vuetify

Versions and Environment

Vuetify: 1.0.4
Vue: 2.5.13
Browsers: Firefox 58.0.2
OS: macOS 10.12.6 (16G1212)

Steps to reproduce

I have the folowing selection box with select, change and click event listeners:

<v-select uuid="comp1862291722"  v-on:select="handleEvent" v-on:change="handleEvent"  v-on:click="handleEvent"
    class=""
    label="dropdown menu"
    :items="componentStates['comp1862291722'].menuItems"
    editable item-value="text"
>
</v-select>

Both the select and the change events are triggered and my handler method is called:

handleEvent: function(event) {
    var message = {
        "uuid": $(event.currentTarget).attr("uuid"),
        "event": event.type,
        "payload": event,
    };
    ....

Unfortunately the event argument contains the selected value, not any of the other expected infos, like currentTarget or type

Other widgets seem to provide the event object correctly.

Expected Behavior

The event object should be provided

Furthermore imho v-select should support standard events like click, blur etc.

wontfix

Most helpful comment

I my opinion it is bug. Variable $event in combobox is array when it should be event because of I cant use

@change.prevent

syntax. Error says that array with values from combobox does not have method preventDefault().

You can read about default modifiers there:

https://vuejs.org/v2/guide/events.html#Event-Modifiers

All 2 comments

v-select is a completely custom component, there is no dom event to emit. If you want additional information for your handler you can pass it in yourself: https://vuejs.org/v2/guide/events.html#Methods-in-Inline-Handlers

Blur and click should work as far as I know, create a bug report with reproduction otherwise.

I my opinion it is bug. Variable $event in combobox is array when it should be event because of I cant use

@change.prevent

syntax. Error says that array with values from combobox does not have method preventDefault().

You can read about default modifiers there:

https://vuejs.org/v2/guide/events.html#Event-Modifiers

Was this page helpful?
0 / 5 - 0 ratings

Related issues

paladin2005 picture paladin2005  路  3Comments

gluons picture gluons  路  3Comments

aaronjpitts picture aaronjpitts  路  3Comments

sebastianmacias picture sebastianmacias  路  3Comments

ricardovanlaarhoven picture ricardovanlaarhoven  路  3Comments