code refactoring

This commit is contained in:
Burak Civan 2022-06-22 15:09:49 +03:00
parent 2774ba5e07
commit 0c492dbeaf

View File

@ -385,11 +385,10 @@ export default {
}, },
onOptionSelected(value) { onOptionSelected(value) {
this.show_icon = false;
this.current_value = value; this.current_value = value;
this.range = false; this.range = false;
this.onChangeSearchAndFilterText(this.selectPlaceholder); this.onChangeSearchAndFilterText(this.selectPlaceholder, false);
let option = false; let option = false;
let option_url = false; let option_url = false;
@ -522,7 +521,7 @@ export default {
this.show_close_icon = true; this.show_close_icon = true;
let select_value = false; let select_value = false;
this.onChangeSearchAndFilterText(this.enterPlaceholder); this.onChangeSearchAndFilterText(this.enterPlaceholder, false);
for (let i = 0; i < this.values.length; i++) { for (let i = 0; i < this.values.length; i++) {
if (this.values[i].key == value) { if (this.values[i].key == value) {
@ -582,7 +581,7 @@ export default {
this.show_date = false; this.show_date = false;
if (this.filter_index == 0) { if (this.filter_index == 0) {
this.onChangeSearchAndFilterText(this.defaultPlaceholder); this.onChangeSearchAndFilterText(this.defaultPlaceholder, true);
} }
this.filter_last_step = 'options'; this.filter_last_step = 'options';
@ -597,8 +596,9 @@ export default {
this.onInputConfirm(); this.onInputConfirm();
}, },
onChangeSearchAndFilterText(arg) { onChangeSearchAndFilterText(arg, param) {
this.dynamicPlaceholder = arg; this.dynamicPlaceholder = arg;
this.show_icon = param;
}, },
convertOption(options) { convertOption(options) {
@ -770,7 +770,7 @@ export default {
mounted() { mounted() {
if (this.filter_index > 0) { if (this.filter_index > 0) {
this.onChangeSearchAndFilterText(this.enterPlaceholder); this.onChangeSearchAndFilterText(this.enterPlaceholder, false);
} }
}, },