From 9dae734080af7af5ea5234098b1788efb51407cb Mon Sep 17 00:00:00 2001 From: zhangqin3 Date: Mon, 6 Jul 2015 18:57:16 +0800 Subject: [PATCH 1/2] [fixed] Negative page number in Pagination when ellipsis=true and items=1 --- src/Pagination.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Pagination.js b/src/Pagination.js index df159e70bf..3fb5901347 100644 --- a/src/Pagination.js +++ b/src/Pagination.js @@ -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; } From c64679f67cea026eed36d443c025761570aacf07 Mon Sep 17 00:00:00 2001 From: zhangqin3 Date: Mon, 6 Jul 2015 19:04:45 +0800 Subject: [PATCH 2/2] [fixed] Active Next and Last button in Pagination when ellipsis=true and items=0 --- src/Pagination.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Pagination.js b/src/Pagination.js index 3fb5901347..71909aa694 100644 --- a/src/Pagination.js +++ b/src/Pagination.js @@ -112,7 +112,7 @@ const Pagination = React.createClass({ = this.props.items} onSelect={this.props.onSelect}> @@ -144,7 +144,7 @@ const Pagination = React.createClass({ = this.props.items} onSelect={this.props.onSelect}> »