Skip to content
This repository was archived by the owner on May 3, 2018. It is now read-only.
This repository was archived by the owner on May 3, 2018. It is now read-only.

Set text key and value key on select element #235

@joshlieb

Description

@joshlieb

So let's say I have a list of employees stored in the database, the employee model looks something like this: { Id: 1, Name: 'John', Age: 56, Income: 5000 } now in order to bind the options to a v-model using a select element I'd have to something like this which is okay if I just do it once like in the sample, but way too messy when I start using it all across the app.

What I would suggest is something like this: <select v-model="name" options="names" text="Name" value="Id">, knockout offers something like that as demonstrated here.

Thanks in advance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions