Skip to content

Commit

Permalink
feat(FilteredModelSelect): add no-option template
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanvanherwijnen committed Dec 9, 2024
1 parent 0948370 commit 1df3ea7
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/new-ties-kiss.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@simsustech/quasar-components": patch
---

feat(FilteredModelSelect): add no-option template
7 changes: 7 additions & 0 deletions packages/components/src/ui/form/FilteredModelSelect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@
<template v-for="(_, slot) in $slots" #[slot]="scope">
<slot :name="slot" v-bind="scope || {}" />
</template>
<template #no-option>
<q-item>
<q-item-section class="text-italic text-grey">
{{ lang.noResultsAvailable }}
</q-item-section>
</q-item>
</template>
</q-select>
</template>

Expand Down
1 change: 1 addition & 0 deletions packages/components/src/ui/form/lang/en-US.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ const lang: Language = {
yes: 'Yes',
no: 'No',
selectMultiple: 'Select one or multiple',
noResultsAvailable: 'No results available.',
buttons: {
close: 'Close'
},
Expand Down
1 change: 1 addition & 0 deletions packages/components/src/ui/form/lang/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ export interface Language {
yes: string
no: string
selectMultiple: string
noResultsAvailable: string
buttons: {
close: string
}
Expand Down
1 change: 1 addition & 0 deletions packages/components/src/ui/form/lang/nl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ const lang: Language = {
yes: 'Ja',
no: 'Nee',
selectMultiple: 'Selecteer één of meerdere',
noResultsAvailable: 'Geen resultaten beschikbaar.',
buttons: {
close: 'Sluiten'
},
Expand Down

0 comments on commit 1df3ea7

Please sign in to comment.