Hello,
is there a way to add values if nothing is found on Ajax?
You should be able to enter a value yourself.
My current code:
<label for="input_artNr">ArtNr</label>
<v-select v-model="invoice_product.artNr" :placeholder="'Enter ArtNr'" :clearSearchOnSelect="false" :filterable="false" :options="foundProductByArtNr" @search="searchForProductByArtNr">
<template slot="no-options">
search by ArtNr ..
</template>
<template slot="option" slot-scope="option">
<div class="d-center">
{{option.artNr}} - {{option.title}}
</div>
</template>
<template slot="selected-option" slot-scope="option">
<div class="selected d-center">
{{option.artNr}}
</div>
</template>
</v-select
Thank you.
Greetings from Hamburg,
Fabian
It seems that I'm a little to late. Anyway, you need :taggable option. Like so
<v-select
v-model="invoice_product.artNr"
:placeholder="'Enter ArtNr'"
:clearSearchOnSelect="false"
:filterable="false"
:options="foundProductByArtNr"
:taggable="true"
@search="searchForProductByArtNr"
>
@TheSmartnik thanks, i will try it.
Now i try this solution. @TheSmartnik
its works half.
The products are loaded but not displayed. Only the tag is shown.
Then i click outsite the input and then click inside the input the products are shown. Then i try to search the product, only the tag is displayed.
Most helpful comment
It seems that I'm a little to late. Anyway, you need
:taggableoption. Like so