I am trying:
<v-select :options="myOptions" ref="mySelect" />
...
mounted() {
this.$refs.mySelect.focus();
}
This is resulting in an error:
this.$refs.mySelect.focus is not a function
Am I missing something? There is no pointer in documents about focusing on the select box via code.
Haven't tested, but this should work: this.$refs.mySelect.$refs.search.focus().
Can confirm this works. Thanks @sagalbot!
Most helpful comment
Haven't tested, but this should work:
this.$refs.mySelect.$refs.search.focus().