From ca622833a6a6d975e37ec74beae0b0be63f63f07 Mon Sep 17 00:00:00 2001 From: Wouter Hardeman Date: Thu, 16 Mar 2017 18:34:54 +0100 Subject: [PATCH] Updated @types/react-paginate to version 4.2.0 --- react-paginate/index.d.ts | 24 +++++++++++++++++------- react-paginate/react-paginate-tests.tsx | 2 +- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/react-paginate/index.d.ts b/react-paginate/index.d.ts index aaa3931b74..fa1d928ce0 100644 --- a/react-paginate/index.d.ts +++ b/react-paginate/index.d.ts @@ -1,6 +1,6 @@ -// Type definitions for react-paginate 2.1.3 +// Type definitions for react-paginate 4.2.0 // Project: https://github.com/AdeleD/react-paginate -// Definitions by: Simon Hartcher +// Definitions by: Simon Hartcher , Wouter Hardeman // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.1 @@ -10,7 +10,7 @@ interface ReactPaginateProps { /** * The total number of pages. */ - pageNum: number; + pageCount: number; /** * The range of pages displayed. @@ -43,19 +43,24 @@ interface ReactPaginateProps { breakClassName?: string | JSX.Element; /** - * The method to call when a page is clicked. + * The method to call when a page is clicked. Exposes the current page object as an argument. */ - clickCallback?: Function; + onPageChange?: Function; /** * The initial page selected. */ - initialSelected?: number; + initialPage?: number; /** * To override selected page with parent prop. */ - forceSelected?: number; + forcePage?: number; + + /** + * Disable `onPageChange` callback with initial page. Default: `false` + */ + disableInitialCallback?: boolean /** * The classname of the pagination container. @@ -101,6 +106,11 @@ interface ReactPaginateProps { * The classname for disabled `previous` and `next` buttons. */ disabledClassName?: string; + + /** + * The method is called to generate the `href` attribute value on tag `a` of each page element. + */ + hrefBuilder?: Function; } declare const ReactPaginate: React.ComponentClass; diff --git a/react-paginate/react-paginate-tests.tsx b/react-paginate/react-paginate-tests.tsx index 2ae495eacf..42a7c49c30 100644 --- a/react-paginate/react-paginate-tests.tsx +++ b/react-paginate/react-paginate-tests.tsx @@ -5,7 +5,7 @@ class Test extends React.Component<{}, {}> { public render() { return (