vue-simple-suggest icon indicating copy to clipboard operation
vue-simple-suggest copied to clipboard

value-attribute doesn't return id

Open speckis opened this issue 5 years ago • 1 comments

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.

speckis avatar Nov 09 '20 18:11 speckis

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.

bretthacker avatar Dec 02 '21 00:12 bretthacker