mattiash / angular-tablesort

Sort angularjs tables easily
MIT License
184 stars 66 forks source link

Reset currentPage when pageSize is updated #112

Open nederdirk opened 6 years ago

nederdirk commented 6 years ago

This patch resets pagination.currentPage whenever pagination.pageSize is updated. This is useful in situations like this:

  1. Given that there are several pages in the table and the current page size is not the max possible
  2. When you select the last page
  3. And when you increase the current page size
  4. without this patch, then there would be no items visible in the table. With this patch, then the first page with the new page size would be displayed.