Skip to content

Commit

Permalink
feature: added empty search hint & fix clear search button for Simple…
Browse files Browse the repository at this point in the history
…Select; added placeholders for SimpleSelect & TagSelect
  • Loading branch information
Holovin committed Nov 5, 2023
1 parent c659635 commit abdda6c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 8 additions & 2 deletions frontend/static/js/components/SimpleSelect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,13 @@
:options="options"
:value="currentValue"
@input="onChange"
placeholder="Комната не выбрана"
>
<template #no-options="{ search, searching, loading }">
<template>
Ничего не найдено
</template>
</template>
</v-select>
</div>
</template>
Expand All @@ -30,12 +36,12 @@ export default {
},
data() {
return {
currentValue: this.options.find(x => x.code === this.initialValue) || {},
currentValue: this.options.find(x => x.code === this.initialValue) || [],
};
},
methods: {
onChange(newValue) {
this.currentValue = newValue || {};
this.currentValue = newValue || [];
}
}
};
Expand Down
2 changes: 1 addition & 1 deletion frontend/static/js/components/TagSelect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
:multiple="allowMultiple"

label="title"
placeholder=""
placeholder="Тег не выбран"

v-model="selectValue"

Expand Down

0 comments on commit abdda6c

Please sign in to comment.