I try to write pagination. Problem is with next/prev buttons. On click I try to call this.$router.push() with path name and several queries. The problems is that vue-router immediately goes to correct link with queries, but after immediately goes to same link but without queries.
This is method on pagination button
goToPage(forward) {
this.$router.push({name: 'spots', query: {per_page: 5, page: 2}});
}
This is how route is defined in router.js file
{
path: '/:eventId/guestlists/:guestlistId/spots',
component: SpotsAndMeals,
name: 'spots',
props: true
},
What do I want? I want after executing goToPage function route in my browser is updated and is displayed with query params.