Skip to content

Commit

Permalink
Move pagination react keys onto wrapping elements (#1514)
Browse files Browse the repository at this point in the history
* Move pagination react keys onto wrapping elements

* changelog
  • Loading branch information
chandlerprall authored Feb 4, 2019
1 parent 83a6289 commit 6eb3900
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
**Bug fixes**

- Updated `EuiPage` background color to match body background color ([#1513](https://github.com/elastic/eui/pull/1513))
- Fixed React key usage in `EuiPagination` ([#1514](https://github.com/elastic/eui/pull/1514))

## [`6.8.0`](https://github.com/elastic/eui/tree/v6.8.0)

Expand Down
4 changes: 2 additions & 2 deletions src/components/pagination/pagination.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,13 @@ export const EuiPagination = ({
if (firstPageInRange > 0) {
firstPageButtons.push(
<EuiI18n
key="0"
token="euiPagination.pageOfTotal"
default="Page {page} of {total}"
values={{ page: 1, total: lastPageInRange }}
>
{pageOfTotal => (
<EuiPaginationButton
key="0"
onClick={onPageClick.bind(null, 0)}
hideOnMobile
aria-label={pageOfTotal}
Expand Down Expand Up @@ -116,13 +116,13 @@ export const EuiPagination = ({

lastPageButtons.push(
<EuiI18n
key={pageCount - 1}
token="euiPagination.jumpToLastPage"
default="Jump to the last page, number {pageCount}"
values={{ pageCount }}
>
{jumpToLastPage => (
<EuiPaginationButton
key={pageCount - 1}
onClick={onPageClick.bind(null, pageCount - 1)}
hideOnMobile
aria-label={jumpToLastPage}
Expand Down

0 comments on commit 6eb3900

Please sign in to comment.