How can I select tags using multiple select in iview UI

749 Views Asked by At

I want to select not only from select drop down options, also I want to add custom tags from users input. In current select, I can only select multiple items from the available itemlists array. But I want to select what ever users insert. Is it possible in iView?

<Select v-model="model9" filterable multiple>
     <Option v-for="item in cityList" :value="item.value" :key="item.value">{{ item.label }}</Option>
</Select>

Current problem is, user can only select from the array cityList but I want any custom input from the user.

Thank you.

1

There are 1 best solutions below

0
randomhero177 On

In v4.0.0 there is an allow-create prop which allows you to create new items.

<Select v-model="model18" filterable multiple allow-create @on-create="handleCreate2">
    <Option v-for="item in cityList4" :value="item.value" :key="item.value">{{ item.label }}</Option>
</Select>