From 0c492dbeaf577b8f3b7d283ed632e750fd6ed01b Mon Sep 17 00:00:00 2001 From: Burak Civan Date: Wed, 22 Jun 2022 15:09:49 +0300 Subject: [PATCH] code refactoring --- resources/assets/js/components/AkauntingSearch.vue | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/resources/assets/js/components/AkauntingSearch.vue b/resources/assets/js/components/AkauntingSearch.vue index b8f0026e2..ebf00d8bd 100644 --- a/resources/assets/js/components/AkauntingSearch.vue +++ b/resources/assets/js/components/AkauntingSearch.vue @@ -385,11 +385,10 @@ export default { }, onOptionSelected(value) { - this.show_icon = false; this.current_value = value; this.range = false; - this.onChangeSearchAndFilterText(this.selectPlaceholder); + this.onChangeSearchAndFilterText(this.selectPlaceholder, false); let option = false; let option_url = false; @@ -522,7 +521,7 @@ export default { this.show_close_icon = true; let select_value = false; - this.onChangeSearchAndFilterText(this.enterPlaceholder); + this.onChangeSearchAndFilterText(this.enterPlaceholder, false); for (let i = 0; i < this.values.length; i++) { if (this.values[i].key == value) { @@ -582,7 +581,7 @@ export default { this.show_date = false; if (this.filter_index == 0) { - this.onChangeSearchAndFilterText(this.defaultPlaceholder); + this.onChangeSearchAndFilterText(this.defaultPlaceholder, true); } this.filter_last_step = 'options'; @@ -597,8 +596,9 @@ export default { this.onInputConfirm(); }, - onChangeSearchAndFilterText(arg) { + onChangeSearchAndFilterText(arg, param) { this.dynamicPlaceholder = arg; + this.show_icon = param; }, convertOption(options) { @@ -770,7 +770,7 @@ export default { mounted() { if (this.filter_index > 0) { - this.onChangeSearchAndFilterText(this.enterPlaceholder); + this.onChangeSearchAndFilterText(this.enterPlaceholder, false); } },