Skip to content

Commit

Permalink
fix issue with key when using custom page elements
Browse files Browse the repository at this point in the history
  • Loading branch information
Victor committed Dec 2, 2017
1 parent 2b7e5bf commit 02363a9
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/pagination/PaginationList.js
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ class PaginationList extends Component {
false :
true;
}, this)
.map(function(page) {
.map(function(page, index) {
const isActive = page === this.props.currPage;
const isDisabled = (isStart(page, this.props) || isEnd(page, this.props)) ?
true :
Expand All @@ -241,7 +241,7 @@ class PaginationList extends Component {
}

return (
<PageButton key={ page }
<PageButton key={ index }
title={ title }
changePage={ this.changePage }
active={ isActive }
Expand Down Expand Up @@ -313,7 +313,10 @@ PaginationList.propTypes = {
paginationShowsTotal: PropTypes.oneOfType([ PropTypes.bool, PropTypes.func ]),
paginationSize: PropTypes.number,
onSizePerPageList: PropTypes.func,
prePage: PropTypes.string,
prePage: PropTypes.any,
nextPage: PropTypes.any,
firstPage: PropTypes.any,
lastPage: PropTypes.any,
pageStartIndex: PropTypes.number,
hideSizePerPage: PropTypes.bool,
alwaysShowAllBtns: PropTypes.bool,
Expand Down

0 comments on commit 02363a9

Please sign in to comment.