Skip to content

Commit 02363a9

Browse files
author
Victor
committed
fix issue with key when using custom page elements
1 parent 2b7e5bf commit 02363a9

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/pagination/PaginationList.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ class PaginationList extends Component {
223223
false :
224224
true;
225225
}, this)
226-
.map(function(page) {
226+
.map(function(page, index) {
227227
const isActive = page === this.props.currPage;
228228
const isDisabled = (isStart(page, this.props) || isEnd(page, this.props)) ?
229229
true :
@@ -241,7 +241,7 @@ class PaginationList extends Component {
241241
}
242242

243243
return (
244-
<PageButton key={ page }
244+
<PageButton key={ index }
245245
title={ title }
246246
changePage={ this.changePage }
247247
active={ isActive }
@@ -313,7 +313,10 @@ PaginationList.propTypes = {
313313
paginationShowsTotal: PropTypes.oneOfType([ PropTypes.bool, PropTypes.func ]),
314314
paginationSize: PropTypes.number,
315315
onSizePerPageList: PropTypes.func,
316-
prePage: PropTypes.string,
316+
prePage: PropTypes.any,
317+
nextPage: PropTypes.any,
318+
firstPage: PropTypes.any,
319+
lastPage: PropTypes.any,
317320
pageStartIndex: PropTypes.number,
318321
hideSizePerPage: PropTypes.bool,
319322
alwaysShowAllBtns: PropTypes.bool,

0 commit comments

Comments
 (0)