From af63181104d64fdf9839fc50c03eaacaa7179ec1 Mon Sep 17 00:00:00 2001 From: koprinkov Date: Mon, 29 Jan 2018 22:28:45 +0200 Subject: [PATCH] @types/react-table onFetchData definition updated and pages added to ControlledStateOverrideProps (#23141) * onFetchData definition updated and pages added to ControlledStateOverrideProps * .tsx alignment --- types/react-table/index.d.ts | 5 ++++- types/react-table/react-table-tests.tsx | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/types/react-table/index.d.ts b/types/react-table/index.d.ts index fed845fd49..1800a9d745 100644 --- a/types/react-table/index.d.ts +++ b/types/react-table/index.d.ts @@ -167,7 +167,7 @@ export interface TableProps extends PadRowComponent: () => React.ReactNode; /** Server-side callbacks */ - onFetchData: () => void; + onFetchData: (state: any, instance: any) => void; } export interface ControlledStateOverrideProps { @@ -177,6 +177,9 @@ export interface ControlledStateOverrideProps { /** Default: undefined */ pageSize: number | undefined; + /** Default: undefined */ + pages: number | undefined; + /** Default: undefined */ sorting: number; diff --git a/types/react-table/react-table-tests.tsx b/types/react-table/react-table-tests.tsx index a5609394ce..3230e4c5da 100644 --- a/types/react-table/react-table-tests.tsx +++ b/types/react-table/react-table-tests.tsx @@ -93,6 +93,7 @@ const Component = (props: {}) => { PadRowComponent={() =>  } page={undefined} pageSize={undefined} + pages={undefined} sorted={[]} filtered={[]} resized={[]} @@ -106,7 +107,7 @@ const Component = (props: {}) => { indexKey='_index' groupedByPivotKey='_groupedByPivot' className='' - onFetchData={() => null} + onFetchData={(state, instance) => null} style={{}} column={{ Cell: undefined,