Skip to content

Commit

Permalink
fix(module:table): fix nzIsPageIndexReset for wrong display (#372) (#373
Browse files Browse the repository at this point in the history
)

close #372
  • Loading branch information
alche1224 authored and vthinkxie committed Sep 30, 2017
1 parent cf83c96 commit 90f0333
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/table/nz-table.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ export class NzTableComponent implements AfterViewInit, OnInit {
this.nzPageIndex = 1;
} else {
const maxPageIndex = Math.ceil(this._dataSet.length / this.nzPageSize);
this.nzPageIndex = this.nzPageIndex > maxPageIndex ? maxPageIndex : this.nzPageIndex;
this.nzPageIndex = !this.nzPageIndex ? 1 : (this.nzPageIndex > maxPageIndex ? maxPageIndex : this.nzPageIndex);
}
}
this.data = this._dataSet.slice((this.nzPageIndex - 1) * this.nzPageSize, this.nzPageIndex * this.nzPageSize);
Expand Down

0 comments on commit 90f0333

Please sign in to comment.