0๐
โ
You can select your element and then force scroll it up
// Get element
let obj = document.getElementByID("yourElementID");
// Set scroll position to 0 (top)
obj.scrollTop = 0;
See https://www.w3schools.com/jsref/prop_element_scrolltop.asp for more infos
You can also select the element with VueJS $refs
if you want : https://v2.vuejs.org/v2/api/#vm-refs
0๐
On your pagination click just write the following function code:
scrollToTop() {
window.scrollTo(0,0);
}
Source:stackexchange.com