From c1ec28ee55f9bc10e3e3667acdb8cc393345bb28 Mon Sep 17 00:00:00 2001 From: Theofanis Despoudis Date: Wed, 20 Mar 2019 17:27:41 +0000 Subject: [PATCH] [Pagination] - Added props doc mentioning the activePage is zero based (#1740) * [Pagination] - Added props doc mentioning the activePage is zero based * [Pagination] - Updated Changelog * Code Review - Moved Changelog entry to current master --- CHANGELOG.md | 1 + src/components/pagination/pagination.js | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bd481764fba..a80b9387d4d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ ## [`master`](https://github.com/elastic/eui/tree/master) +- Added documentation entry in `EuiPagination` for `activePage` prop. ([#1740](https://github.com/elastic/eui/pull/1740)) - Changed `EuiButton` to use "m" as it's default `size` prop ([#1742](https://github.com/elastic/eui/pull/1742)) ## [`9.4.2`](https://github.com/elastic/eui/tree/v9.4.2) diff --git a/src/components/pagination/pagination.js b/src/components/pagination/pagination.js index 996a48be5c7..769716cacd5 100644 --- a/src/components/pagination/pagination.js +++ b/src/components/pagination/pagination.js @@ -186,9 +186,14 @@ EuiPagination.propTypes = { className: PropTypes.string, /** - * The total number of pages + * The total number of pages. */ pageCount: PropTypes.number, + + /** + * The current page using a zero based index. + * So if you set the activePage to 1, it will activate the second page. + */ activePage: PropTypes.number, onPageClick: PropTypes.func,