Home

Issue: 2978

Question - Scroll to top after axios

[issue link]

hi guys so I have something like this:

  methods: {
    async getBlogs(url) {
      const newBlogs = await this.$axios.$get(url)
      this.blogs = newBlogs
    },
    async getSpecificPage(page) {
      const newPageBlogs = await this.$axios.$get(process.env.API_URL + 'api/blogs/all?page=' + page)
      this.blogs = newPageBlogs
    }

now what I want to do after this.blogs is assigned, is scroll to top but the route itself is not changing. Is there any way to do that?

Thanks

This question is available on Nuxt.js community (#c2581)