Skip to content

Commit

Permalink
fix(pagination): updating Pagination.totalPages
Browse files Browse the repository at this point in the history
When updating `Pagination.totalPages` after total amount of items
changed it goes to the last page (by calling
`this.selectPage(totalPages)`).

Instead, if at all, it should go to `this.page`.
  • Loading branch information
ryzy committed Oct 26, 2015
1 parent 6ab7edb commit df0c0f0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/pagination/pagination.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ export class Pagination implements ControlValueAccessor, OnInit, IPaginationConf
this._totalPages = v;
this.numPages.next(v);
if (this.inited) {
this.selectPage(v);
this.selectPage(this.page);
}
}

Expand Down

0 comments on commit df0c0f0

Please sign in to comment.