Skip to content

Commit 1900475

Browse files
committed
Closes #408 add missing TypeScript def
1 parent 281d1a7 commit 1900475

3 files changed

Lines changed: 10 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
- Removed support for depecrated `extraAriaContext` (please use `ariaLabelBuilder` instead)
44

5+
## >= 8.1.1
6+
7+
- Add TypeScript definition for `pageLabelBuilder` prop
8+
59
## >= 8.1.0
610

711
- A new prop `onClick` has been added. It is a callback for any click on the component. It exposes information on the part clicked (for eg. `isNext` for when next control is clicked or `isBreak` for a break clicked), the next expected page `nextSelectedPage` & others. Can return `false` to prevent any page change or a number to override the page to jump to. Just return nothing (or `undefined`) to let default behavior take place. (see: https://github.com/AdeleD/react-paginate/issues/263)

index.d.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,11 @@ export interface ReactPaginateProps {
142142
*/
143143
pageLinkClassName?: string | undefined;
144144

145+
/**
146+
* Function to set the text on page links. Defaults to `(page) => page`
147+
*/
148+
pageLabelBuilder?(page: number): string | React.ReactNode;
149+
145150
/**
146151
* The classname for the active page.
147152
*/

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-paginate",
3-
"version": "8.1.0",
3+
"version": "8.1.1",
44
"description": "A ReactJS component that creates a pagination.",
55
"main": "./dist/react-paginate.js",
66
"repository": {

0 commit comments

Comments
 (0)