Selected option setting id value
See original GitHub issueIf there is a default value for vue-select it sets id value. it doesnt set label.
<v-select
:options="agentList"
label="full_name"
v-model="$v.agent_id.$model">
>
</v-select>
When I inspect from vue dev tools selectedValue appears as 1.
I expect to see full_name
at first but it shows id
value.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:7
- Comments:10
Top Results From Across the Web
How to get and set the value of a select menu using an ID
Getting the selected ID using the selectedIndex and options properties # ... The options property returns an HTMLOptionsCollection , an array-like ...
Read more >How to set selected option of select element by its ID?
javascript - How to set selected option of select element by its ID? - Stack Overflow. Stack Overflow for Teams – Start collaborating...
Read more >How to set the default value for an HTML <select> element
The default value of the select element can be set by using the 'selected' attribute on the required option. This is a boolean...
Read more >HTML option selected Attribute - W3Schools
The selected attribute is a boolean attribute. When present, it specifies that an option should be pre-selected when the page loads. The pre-selected...
Read more ><select>: The HTML Select element - HTML - MDN Web Docs
Each <option> element should have a value attribute containing the data value to submit to the server when that option is selected. If...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Just use the
get-option-label
prop: https://vue-select.org/api/props.html#getoptionlabelYes. Vue Multiselect - https://vue-multiselect.js.org/
Works better and has more features.