From ba524f964a06f182bf60cb105a53a18861fea747 Mon Sep 17 00:00:00 2001 From: AllenFang Date: Tue, 27 Sep 2016 14:30:01 +0800 Subject: [PATCH] fix #719 --- src/pagination/PaginationList.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/pagination/PaginationList.js b/src/pagination/PaginationList.js index 4e93c7d57..255bb47b8 100644 --- a/src/pagination/PaginationList.js +++ b/src/pagination/PaginationList.js @@ -82,11 +82,12 @@ class PaginationList extends Component { }); const offset = Math.abs(Const.PAGE_START_INDEX - pageStartIndex); - const start = ((currPage - pageStartIndex) * sizePerPage); + let start = ((currPage - pageStartIndex) * sizePerPage); + start = dataSize === 0 ? 0 : start + 1; let to = Math.min((sizePerPage * (currPage + offset) - 1), dataSize); if (to >= dataSize) to--; let total = paginationShowsTotal ? - Showing rows { start + 1 } to { to + 1 } of { dataSize } + Showing rows { start } to { to + 1 } of { dataSize } : null; if (typeof paginationShowsTotal === 'function') {