[Feature Request] Set object default value using label for select
- Dominant language
- Vue
- Stars
- 54k
- Forks
- 14.4k
- PR merge metrics
- No merged PRs in 30d
Description
### Existing Component
Yes
### Component Name
el-select
### Description
I have an object that I want to set as default value for el-select.
There is a prop "value-key" that determines which field from the object to treat as a key. But it's also used as a label in this case.
How to set a "value-label" so the select's input displays custom label rather then the value of the key?
I use the below "hack" which is not really reliable:
this.$nextTick(() => {
let label = object[this.labelKey]
let elem = this.$refs.selectElem
elem.selectedLabel = label
})
What is the correct way to accomplish that?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.