Add dropdown options
This commit is contained in:
parent
846f2697d3
commit
e495031999
|
@ -2,23 +2,23 @@
|
||||||
<label class="w-full border border-solid border-gray-500 focus-within:border-primary rounded-lg relative flex" :for="id">
|
<label class="w-full border border-solid border-gray-500 focus-within:border-primary rounded-lg relative flex" :for="id">
|
||||||
<select
|
<select
|
||||||
v-if="!allowcustom"
|
v-if="!allowcustom"
|
||||||
:name="name"
|
|
||||||
:id="id"
|
:id="id"
|
||||||
class="bg-white group-[.info]:bg-blue-200 rounded-lg focus:outline-none text-gray-600 text-left py-1 px-2 @sm:py-2 @sm:group-[.info]:py-1 text-sm @sm:text-base @sm:group-[.info]:text-sm @sm:px-3 @sm:group-[.info]:px-2 w-full"
|
|
||||||
v-model="inner"
|
v-model="inner"
|
||||||
|
:name="name"
|
||||||
|
class="bg-white group-[.info]:bg-blue-200 rounded-lg focus:outline-none text-gray-600 text-left py-1 px-2 @sm:py-2 @sm:group-[.info]:py-1 text-sm @sm:text-base @sm:group-[.info]:text-sm @sm:px-3 @sm:group-[.info]:px-2 w-full"
|
||||||
>
|
>
|
||||||
<option :value="null">-- kein --</option>
|
<option :value="null">-- kein --</option>
|
||||||
<option v-for="(option, index) in options" :key="index" :value="option.id" v-text="option.name"></option>
|
<option v-for="(option, index) in options" :key="index" :value="option.id" v-text="option.name"></option>
|
||||||
</select>
|
</select>
|
||||||
<input
|
<input
|
||||||
class="bg-white group-[.info]:bg-blue-200 rounded-lg focus:outline-none text-gray-600 text-left py-1 px-2 @sm:py-2 @sm:group-[.info]:py-1 text-sm @sm:text-base @sm:group-[.info]:text-sm @sm:px-3 @sm:group-[.info]:px-2 w-full"
|
|
||||||
v-if="allowcustom"
|
v-if="allowcustom"
|
||||||
|
v-model="inner"
|
||||||
|
class="bg-white group-[.info]:bg-blue-200 rounded-lg focus:outline-none text-gray-600 text-left py-1 px-2 @sm:py-2 @sm:group-[.info]:py-1 text-sm @sm:text-base @sm:group-[.info]:text-sm @sm:px-3 @sm:group-[.info]:px-2 w-full"
|
||||||
type="text"
|
type="text"
|
||||||
:list="`${id}-list`"
|
:list="`${id}-list`"
|
||||||
v-model="inner"
|
|
||||||
/>
|
/>
|
||||||
<datalist v-if="allowcustom" :id="`${id}-list`">
|
<datalist v-if="allowcustom" :id="`${id}-list`">
|
||||||
<option>lala</option>
|
<option v-for="(option, index) in options" :key="index" :value="option.id" v-text="option.name"></option>
|
||||||
</datalist>
|
</datalist>
|
||||||
<div v-if="hint" class="absolute right-0 mr-2 flex items-center h-full">
|
<div v-if="hint" class="absolute right-0 mr-2 flex items-center h-full">
|
||||||
<hint :value="hint"></hint>
|
<hint :value="hint"></hint>
|
||||||
|
|
Loading…
Reference in New Issue