Open luismabenitez opened 3 years ago
When creating a new tag in a single select, the first option i get is to deselect the new option "Press enter to remove". So the user needs to click twice to make it selected.
Using with Vue 3.
<VueMultiselect :options="options" track-by="id" label="name" tag-placeholder="Add new item" :multiple="false" :taggable="true" :loading="isLoading" :searchable="true" :preserveSearch="true" @tag="addItem" @search-change="getItems" @select="selectDog" v-model="selected" :disabled="!breed" :clear-on-select="false" />
I think the expected behavior should to be to select that item we are creating. isn't it?
You can try to set the v-model on the addItem method. When pressing enter to create a new tag, it will be selected automatically.
@luismabenitez - Please provide reproduction link.
When creating a new tag in a single select, the first option i get is to deselect the new option "Press enter to remove". So the user needs to click twice to make it selected.
Using with Vue 3.
<VueMultiselect :options="options" track-by="id" label="name" tag-placeholder="Add new item" :multiple="false" :taggable="true" :loading="isLoading" :searchable="true" :preserveSearch="true" @tag="addItem" @search-change="getItems" @select="selectDog" v-model="selected" :disabled="!breed" :clear-on-select="false" />
I think the expected behavior should to be to select that item we are creating. isn't it?