Hello, I have a problem with navigating back using the f7router; following code:
document.addEventListener('backbutton', () => {
app.$f7.router.back('', {
force: true,
ignoreCache: true,
history: false
})
}, false);
I have a route named category that fetches products using the :category param,
{
name: 'category',
path: '/category/:category',
reloadAll: true,
reloadCurrent: true,
reloadPrevious: true,
meta: {
title: false,
hideNav: false,
requiresCode: true
},
component: CategoryPage
},
My category.vue page:
import CategoryComponent from '../components/products/CategoryComponent'
export default {
components: {
categoryComponent: CategoryComponent
},
methods: {
setOnCategory () {
this.$store.commit('setOnCategory', {
name: this.$f7route.params.category,
loadProducts: true
})
}
},
mounted () {
this.setOnCategory()
}
}
Products are loaded just fine, and when I navigate between categories they are also shown perfectly fine, however when I hit the back button on the device, it goes back to the correct route but it displays products from a previous route, it doesn’t show the right products, even though I’m on the correct route!