From a9a8767b16314a63c751703b5f8c8a7818cd4516 Mon Sep 17 00:00:00 2001 From: Ed Leeks Date: Wed, 10 Feb 2021 09:56:49 +0000 Subject: [PATCH] chore(pager): update pager type definitions to include callback params fix #3561 --- src/components/pager/pager.d.ts | 10 +++++----- src/components/pager/pager.stories.js | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/components/pager/pager.d.ts b/src/components/pager/pager.d.ts index d2e074ab9b..311ec218b5 100644 --- a/src/components/pager/pager.d.ts +++ b/src/components/pager/pager.d.ts @@ -1,11 +1,11 @@ import * as React from 'react'; export interface PagerPropTypes { - onPagination: () => void; - onNext?: () => void; - onFirst?: () => void; - onPrevious?: () => void; - onLast?: () => void; + onPagination: (pageSize: number, currentPage: number) => void; + onNext?: (ev: React.MouseEvent) => void; + onFirst?: (ev: React.MouseEvent) => void; + onPrevious?: (ev: React.MouseEvent) => void; + onLast?: (ev: React.MouseEvent) => void; currentPage?: number | string; totalRecords?: number | string; pageSize?: number | string; diff --git a/src/components/pager/pager.stories.js b/src/components/pager/pager.stories.js index a3baf9933c..5376c7d311 100644 --- a/src/components/pager/pager.stories.js +++ b/src/components/pager/pager.stories.js @@ -44,7 +44,7 @@ export const Default = () => { const pageSize = select( "pageSize", { - 1: 1, + one: 1, 10: 10, 25: 25, 50: 50,