Skip to content

Commit

Permalink
feat: accept localized texts
Browse files Browse the repository at this point in the history
  • Loading branch information
adamberecz committed Mar 6, 2023
1 parent 38367e2 commit eaa78f8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/Multiselect.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ declare class Multiselect extends Vue {
id?: string;
caret?: boolean;
maxHeight?: string|number;
noOptionsText?: string;
noResultsText?: string;
noOptionsText?: string|object;
noResultsText?: string|object;
canDeselect?: boolean;
canClear?: boolean;
clearOnSearch?: boolean;
Expand Down
8 changes: 4 additions & 4 deletions src/Multiselect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -244,11 +244,11 @@
</ul>

<slot v-if="noOptions" name="nooptions">
<div :class="classList.noOptions" v-html="noOptionsText"></div>
<div :class="classList.noOptions" v-html="localize(noOptionsText)"></div>
</slot>

<slot v-if="noResults" name="noresults">
<div :class="classList.noResults" v-html="noResultsText"></div>
<div :class="classList.noResults" v-html="localize(noResultsText)"></div>
</slot>

<div v-if="infinite && hasMore" :class="classList.inifinite" ref="infiniteLoader">
Expand Down Expand Up @@ -415,12 +415,12 @@
default: false,
},
noOptionsText: {
type: String,
type: [String, Object],
required: false,
default: 'The list is empty',
},
noResultsText: {
type: String,
type: [String, Object],
required: false,
default: 'No results found',
},
Expand Down

0 comments on commit eaa78f8

Please sign in to comment.