react-headless-pagination
react-headless-pagination copied to clipboard
[Feature] Add support to render extra props (page number dependent) in the page buttons.
#15
Why:
In one of our project we need to add aria-label
in the page buttons where it will also need the page number. For example aria-label="Go to page 3"
. That is why we need to the support to add/render extra props in the PageButtons.
What:
In the MR, add a new prop renderExtraProps
in the PageButton Component. This optional prop is a function that will pass the current page number as a parameter and expect to get a object in return which will be spreaded in the PageButton component.
Deploy Preview for react-headless-pagination failed.
Name | Link |
---|---|
Latest commit | 375287b1fb5d517d1177d4ef9e78ffa19ef8f00d |
Latest deploy log | https://app.netlify.com/sites/react-headless-pagination/deploys/66307d2f40cee60008c5f451 |