From 162e0d338f5423662829e6d9784186a362a19832 Mon Sep 17 00:00:00 2001 From: Vitalii Lysak Date: Fri, 12 Aug 2022 14:18:47 +0300 Subject: upd route change logic --- src/components/_sila/Global/Search.vue | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/components/_sila/Global') diff --git a/src/components/_sila/Global/Search.vue b/src/components/_sila/Global/Search.vue index 79a403ad..002669cd 100644 --- a/src/components/_sila/Global/Search.vue +++ b/src/components/_sila/Global/Search.vue @@ -102,7 +102,7 @@ export default { this.$emit('search-by', this.searchBy); }, removeSearchParam() { - window.location.href = '/#/logs/event-logs'; + this.$router.push('/logs/event-logs'); }, search() { if (!this.params) { @@ -110,9 +110,14 @@ export default { } let search = this.params.get('search'); + let by = this.params.get('by'); if (search) { this.filter = search; this.onChangeInput(); + if (by) { + this.searchBy = by; + this.onSelect(); + } } }, onChangeInput() { -- cgit v1.2.3