Vuetify: [Bug Report] v-select defaults item-value to the item label instead of return-object

Created on 16 Jan 2019  路  2Comments  路  Source: vuetifyjs/vuetify

Versions and Environment

Vuetify: 1.4.2
Last working version: 1.0.17
Vue: 2.5.22
Browsers: Chrome 71.0.3578.98
OS: Mac OS 10.14.1

Steps to reproduce

Create a v-select with an items array that is a list of objects

      items: [
        { state: 'Florida', abbr: 'FL' },
        { state: 'Florida', abbr: 'FLORIDA_ON_MARS' },
        { state: 'Georgia', abbr: 'GA' },
        { state: 'Nebraska', abbr: 'NE' },
        { state: 'California', abbr: 'CA' },
        { state: 'New York', abbr: 'NY' }
      ]

Now create a v-select that has an item-text defined but no item-value

<v-select
            v-model="select"
            :items="items"
            item-text="state"
            label="Select a State"
>
</v-select>

Now print out the v-model of select which should be a state object

Expected Behavior

When logging out the v-model (select) we should be getting back the full object by default like in Vuetify 1.0.17.

Actual Behavior

Instead we get back the item-text as a plain string and not the full object. The current way around this is using return-object but that seems to have changed as we didn't need to use return-object before by default.

Reproduction Link

https://codepen.io/anon/pen/MZRbpO?editors=1010

bug regression wontfix

Most helpful comment

This sucks.

All 2 comments

I think this has been around for long enough that it would be a bigger breaking change to revert it.

This sucks.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

smousa picture smousa  路  3Comments

KuroThing picture KuroThing  路  3Comments

cawa-93 picture cawa-93  路  3Comments

dschreij picture dschreij  路  3Comments

alterhu2020 picture alterhu2020  路  3Comments