Pagination when changed scroll to top [ Vue instantsearch]

How can I add a trigger when a page is changed ?

I’m using vue js with vue-instantsearch with pagination, when the user changes the page from page 1 to 2 I want the scroll the page to the top.

Hello @dvz

You can listen to page-change event emitted from pagination component.

If you take a look the example above,

<ais-pagination @page-change="pageChange" />

it can attach an event listener for page-change.

Let me know how it goes!

Perfect :slight_smile: thank you.

1 Like