Open GonrasK opened 5 years ago
I'm doing that in the click handler. I place a ref at the top of my content, and then scroll it into view:
<div ref="top"></div>
<div>
<!-- my paginating content -->
</div>
<paginate :click-handler="onPaginate"/>
Then in the onPaginate
method:
function onPaginate () {
this.$refs.top.scrollIntoView();
}
How do i force scroll back to top after moving from page to page (clicking 'next' or on the page's number)? In case my pagination is below the search results.
<paginate v-if="page_count > 1" v-model="page" :page-range="8" :pageCount="page_count" :containerClass="'pagination'" :clickHandler="clickCallback" :prev-text="'Prev'" :next-text="'Next'" > </paginate>