Scroll up on ngb pagination page click

180 views
Skip to first unread message

Dev C

unread,
Oct 22, 2019, 12:34:08 PM10/22/19
to ang...@googlegroups.com
Hello there,
I have below code where in my angular 6 application (pageChange)="loadPage($event)" , I am using loadPage method to scroll up in the table as there 10 records in the table and I need to scroll up to the table to top records. below stuff does not work it does not autoscroll up.

I am having <table class="table responsive">

loadPage(page:number) {
   window.scrollTo(0,0);
}
 <ngb-pagination [collectionSize]="totalRecordCount" (pageChange)="loadPage($event)" [pageSize]="10" [(page)]="page" [maxSize]="3"
                    [ellipses]="false" [rotate]="true" >
                </ngb-pagination>
Reply all
Reply to author
Forward
0 new messages