Skip to content
Snippets Groups Projects
Commit 93a30107 authored by Manikanth Dindigala's avatar Manikanth Dindigala
Browse files

fix: search result list navigation error

parent 15e4c8ad
No related branches found
No related tags found
1 merge request!62fix: search result list navigation error
Pipeline #220256 passed
...@@ -76,15 +76,10 @@ export default { ...@@ -76,15 +76,10 @@ export default {
keyboardLayouts: ['arabic', 'syriac'] keyboardLayouts: ['arabic', 'syriac']
} }
}, },
watch:{ mounted(){
'$route.query': { if(this.$route.query?.searchTerm){
handler(query) { this.input = this.$route.query.searchTerm;
if (query.searchTerm) { }
this.input = query.searchTerm;
}
},
immediate: true,
},
}, },
methods: { methods: {
onSubmit(e) { onSubmit(e) {
......
...@@ -64,14 +64,6 @@ export default { ...@@ -64,14 +64,6 @@ export default {
} }
}, },
watch:{ watch:{
'$route.query': {
handler(query) {
if (query.searchTerm) {
this.onSearchInput(query.searchTerm);
}
},
immediate: true,
},
page: function() { page: function() {
this.loading = true; this.loading = true;
...@@ -79,6 +71,11 @@ export default { ...@@ -79,6 +71,11 @@ export default {
this.search(this.query.trim(), from, this.size); this.search(this.query.trim(), from, this.size);
} }
}, },
mounted(){
if(this.$route.query?.searchTerm){
this.onSearchInput(this.$route.query.searchTerm);
}
},
computed: { computed: {
invalid() { invalid() {
return this.query.match(/^\s*$/); return this.query.match(/^\s*$/);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment