Skip to content

Commit 4489faa

Browse files
Merge pull request #440 from codeanker/changes-2
changes 2
2 parents 8b1e309 + b25c601 commit 4489faa

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

apps/frontend/src/components/BasicInputs/BasicSelect.vue

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,13 @@ const { model, errorMessage } = useValidationModel(props, emit)
5252
>
5353
<ListboxButton class="input-style !flex flex-row items-center gap-x-2 justify-between">
5454
<span :class="cn('text-start', { 'text-gray-500': disabled })">
55-
{{ options.find((option) => option.value === modelValue)?.label || placeholder || 'Bitte wählen...' }}
55+
{{
56+
(multiple && Array.isArray(model)
57+
? model.map((value) => options.find((option) => option.value === value)?.label).join(', ')
58+
: options.find((option) => option.value === model)?.label) ||
59+
placeholder ||
60+
'Bitte wählen...'
61+
}}
5662
</span>
5763
<ChevronDownIcon class="h-5 text-gray-500 self-end" />
5864
</ListboxButton>
@@ -76,13 +82,13 @@ const { model, errorMessage } = useValidationModel(props, emit)
7682
:class="[
7783
active ? 'bg-primary-600 text-white' : 'text-gray-900',
7884
selected ? 'bg-primary-200' : '',
79-
'relative cursor-default select-none px-3 py-2',
85+
'relative cursor-default select-none px-3 py-2 group',
8086
'flex flex-row gap-x-4 items-center',
8187
]"
8288
>
8389
<CheckIcon
8490
class="h-4"
85-
:class="selected ? 'text-primary-600' : 'invisible'"
91+
:class="selected ? 'text-primary-600 group-hover:text-white' : 'invisible'"
8692
/>
8793
<div class="flex flex-col">
8894
<span>{{ option.label }}</span>

0 commit comments

Comments
 (0)