Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move pagination react keys onto wrapping elements #1514

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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