Skip to content

Commit

Permalink
fix(module:pagination): prevent repeated emit events (#281)
Browse files Browse the repository at this point in the history
close #280
  • Loading branch information
hsuanxyz authored and wilsoncook committed Sep 12, 2017
1 parent 13e6632 commit ec66e13
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/components/pagination/nz-pagination.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,10 @@ export class NzPaginationComponent {
}

_jumpPage(index) {
if (index === this._firstIndex - 1 || index === this._lastIndex + 1 || index === this.nzPageIndex) {
return ;
}

if (index < this._firstIndex) {
this.nzPageIndex = this._firstIndex;
} else if (index > this._lastIndex) {
Expand Down

0 comments on commit ec66e13

Please sign in to comment.