From abdda6cf0233887666e0b83a247cf7eb22989fab Mon Sep 17 00:00:00 2001 From: Alex Holovin Date: Sun, 5 Nov 2023 22:40:14 +0100 Subject: [PATCH] feature: added empty search hint & fix clear search button for SimpleSelect; added placeholders for SimpleSelect & TagSelect --- frontend/static/js/components/SimpleSelect.vue | 10 ++++++++-- frontend/static/js/components/TagSelect.vue | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/frontend/static/js/components/SimpleSelect.vue b/frontend/static/js/components/SimpleSelect.vue index ad24d1dea..50df5831a 100644 --- a/frontend/static/js/components/SimpleSelect.vue +++ b/frontend/static/js/components/SimpleSelect.vue @@ -5,7 +5,13 @@ :options="options" :value="currentValue" @input="onChange" + placeholder="Комната не выбрана" > + @@ -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 || []; } } }; diff --git a/frontend/static/js/components/TagSelect.vue b/frontend/static/js/components/TagSelect.vue index 1db47e96f..f246c134d 100644 --- a/frontend/static/js/components/TagSelect.vue +++ b/frontend/static/js/components/TagSelect.vue @@ -6,7 +6,7 @@ :multiple="allowMultiple" label="title" - placeholder="" + placeholder="Тег не выбран" v-model="selectValue"