From df0c0f0c24349791801ab6ea984ff6e4c669a3ba Mon Sep 17 00:00:00 2001 From: Marcin Ryzycki Date: Mon, 26 Oct 2015 00:38:30 +0000 Subject: [PATCH] fix(pagination): updating Pagination.totalPages 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`. --- components/pagination/pagination.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/pagination/pagination.ts b/components/pagination/pagination.ts index f03f2cd2f0..104b67777b 100644 --- a/components/pagination/pagination.ts +++ b/components/pagination/pagination.ts @@ -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); } }