Reputation: 165
So I have a datagrid which fetch all and a search menu. I have an issue when I move to page 4 and then search for some specific items only, it would replace all the data in the grid with a new datas but the page stay at page 4th instead of 1. I need it to be 1 since new datas are not related to old ones
Upvotes: 1
Views: 741
Reputation: 151
I have the exact same scenario. The above solution did the fix:
@ViewChild('pagination') pagination: ClrDatagridPagination;
// reset page
this.pagination.currentPage = 1;
Upvotes: 0
Reputation: 165
Found out that I can use ClrDatagridPagination as a viewchild to control. @ViewChild('pagination') pagination: ClrDatagridPagination;
Upvotes: 3