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