search loading state on Back gesture navigation

This commit is contained in:
Nikita Krupin 2022-07-20 15:21:34 -04:00
parent 9eef8d8762
commit ea482eb29b
1 changed files with 1 additions and 0 deletions

View File

@ -36,6 +36,7 @@ export default {
},
methods: {
getSearch() {
this.$store.commit("search/setLoading", true); // in case navigated to the page not from top bar
const searchQuestion = this.$route.query.q;
this.$youtube.search(searchQuestion).then((response) => {
this.$store.commit("search/setLoading", false);