Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

value-attribute doesn't return id #375

Open
speckis opened this issue Nov 9, 2020 · 1 comment
Open

value-attribute doesn't return id #375

speckis opened this issue Nov 9, 2020 · 1 comment

Comments

@speckis
Copy link

speckis commented Nov 9, 2020

My belief was that "display-attribute='name'" would show the name, and "value-attribute='id'" would return the id.
For ex:
{
"id":5,
"name": Test
}

Then value-attribute would then return 5.

Right now it just returns a static string with just literally "id" in it. Am I doing it wrong, or is there, as of now, no support to get the id from the object? (Similiar to vuetify's autocomplete)

TL;DR: V-model returns the object, need to filter out the objects "id". Value-attribute doesn't do that, as I believed.

@bretthacker
Copy link

My v-model doesn't return the object, it always only ever is assigned the same string as is defined by "display-attribute". I see no way to get the value-attribute.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants