Skip to content

Commit

Permalink
[fixed] Negative page number in Pagination when ellipsis=true and ite…
Browse files Browse the repository at this point in the history
…ms=1
  • Loading branch information
zhangqin3 committed Jul 6, 2015
1 parent 7f3ec2d commit 9dae734
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Pagination.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ const Pagination = React.createClass({
if(!hasHiddenPagesAfter){
endPage = items;
startPage = items - maxButtons + 1;
if(startPage < 1){
startPage = 1;
}
} else {
endPage = startPage + maxButtons - 1;
}
Expand Down

0 comments on commit 9dae734

Please sign in to comment.