0๐
<vue-select
v-model="tankno"
:options="tanks1"
searchable
@input="form.tankno = $event.target.value"
close-on-select label-by="tankno"
class="text-left h-10 sinput"
search-placeholder=" Search Tank No"
placeholder="Select Tank No"
track-by="tankno"
@selected="onSelected"
ref="selectRef"
>
</vue-select>
const onSelected = (e) => {
selectRef.value.input.input.value = e;
}
In my case using Vue js 3, I create template refs (selectRef), then pass the selected value to the search input field.
- [Vuejs]-Should we have Multiple vue apps or a single app per page
- [Vuejs]-Using Ionic native InAppPurchase2 plugin with Vue
Source:stackexchange.com