Does anyone know how to manually scroll the table back to the top?
Because I use client-side transition, if I scroll down, go to a new page with the same table, the table is in the same scroll position as I left it in another page.
By using the onChangePage method, and then looking up the table, I was able to get it to scroll to the top like this:
onChangePage: () => {
const table = document.querySelector("table");
table.scrollIntoView(true);
}
hope this helps!
Most helpful comment
By using the
onChangePagemethod, and then looking up the table, I was able to get it to scroll to the top like this:hope this helps!