0👍
When you select a suggestion from the Autocomplete dropdown it doesn’t just select the id
or the name
, it selects the whole object {...}
.
So once you have it selected you should be able to choose which field you want to use from there on, in your case, the id
.
In a Codepen of one of the examples you can see that the whole object is selected – https://codepen.io/pen?&editable=true&editors=101
Are you sure you’re only getting the id
and not the whole object?
- [Vuejs]-Vue reading data-* attribute
- [Vuejs]-User authentication with Devise-jwt in Ruby On Rails as backend and Vuejs as frontend
Source:stackexchange.com