aboutsummaryrefslogtreecommitdiff
path: root/src/ui/c-select/c-select.vue
diff options
context:
space:
mode:
authorGravatar Corentin THOMASSET <corentin.thomasset74@gmail.com> 2023-11-01 15:38:19 +0100
committerGravatar GitHub <noreply@github.com> 2023-11-01 15:38:19 +0100
commite86fd96ae3b5787252d41b8c49491bb4011d4527 (patch)
tree8d61d2e77dadcdff3108b80ef7384958f69da0f3 /src/ui/c-select/c-select.vue
parent58de8970f53418e0157b80dff7d162d99815679b (diff)
downloadit-tools-e86fd96ae3b5787252d41b8c49491bb4011d4527.tar.gz
it-tools-e86fd96ae3b5787252d41b8c49491bb4011d4527.tar.zst
it-tools-e86fd96ae3b5787252d41b8c49491bb4011d4527.zip
feat(i18n): language selector (#710)
Diffstat (limited to 'src/ui/c-select/c-select.vue')
-rw-r--r--src/ui/c-select/c-select.vue16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/ui/c-select/c-select.vue b/src/ui/c-select/c-select.vue
index fb34038..7b3607c 100644
--- a/src/ui/c-select/c-select.vue
+++ b/src/ui/c-select/c-select.vue
@@ -150,13 +150,15 @@ function onSearchInput() {
@keydown="handleKeydown"
>
<div flex-1 truncate>
- <input v-if="searchable && isOpen" ref="searchInputRef" v-model="searchQuery" type="text" placeholder="Search..." class="search-input" w-full lh-normal color-current @input="onSearchInput">
- <span v-else-if="selectedOption" lh-normal>
- {{ selectedOption.label }}
- </span>
- <span v-else class="placeholder" lh-normal>
- {{ placeholder ?? 'Select an option' }}
- </span>
+ <slot name="displayed-value">
+ <input v-if="searchable && isOpen" ref="searchInputRef" v-model="searchQuery" type="text" placeholder="Search..." class="search-input" w-full lh-normal color-current @input="onSearchInput">
+ <span v-else-if="selectedOption" lh-normal>
+ {{ selectedOption.label }}
+ </span>
+ <span v-else class="placeholder" lh-normal>
+ {{ placeholder ?? 'Select an option' }}
+ </span>
+ </slot>
</div>
<icon-mdi-chevron-down class="chevron" />