Skip to content

Commit

Permalink
fix #719
Browse files Browse the repository at this point in the history
  • Loading branch information
AllenFang committed Sep 27, 2016
1 parent c5f4176 commit ba524f9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/pagination/PaginationList.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 ? <span>
Showing rows { start + 1 } to&nbsp;{ to + 1 } of&nbsp;{ dataSize }
Showing rows { start } to&nbsp;{ to + 1 } of&nbsp;{ dataSize }
</span> : null;

if (typeof paginationShowsTotal === 'function') {
Expand Down

1 comment on commit ba524f9

@jflayhart
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you da man, @AllenFang

Please sign in to comment.