From 84fe340f6757f812622b63613cbc3204aa265224 Mon Sep 17 00:00:00 2001 From: Greg Martin Date: Mon, 4 Nov 2024 15:49:51 -0500 Subject: [PATCH] docs(table): add pageSize to CurrentTableState type --- docusaurus/docs/components/table/index.md | 2 +- packages/table/src/types/ReactTable.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docusaurus/docs/components/table/index.md b/docusaurus/docs/components/table/index.md index 115135c5b..c3b67ccfe 100644 --- a/docusaurus/docs/components/table/index.md +++ b/docusaurus/docs/components/table/index.md @@ -149,7 +149,7 @@ This determines whether the table is sortable or not. #### `initialState?: object` -This object definition sets the initial state of the table, including the default sort by definition. +This object definition sets the initial state of the table, including the default sort by definition and page size. Ex. `initialState: { sortBy: [{ id: 'firstName', desc: false }], pageSize: 5 }`; #### `additionalContent?: ReactNode` diff --git a/packages/table/src/types/ReactTable.ts b/packages/table/src/types/ReactTable.ts index 7fc72ff11..e78b28b0f 100644 --- a/packages/table/src/types/ReactTable.ts +++ b/packages/table/src/types/ReactTable.ts @@ -100,4 +100,5 @@ export type TableInstance = UseSortByInstanceProps & export type CurrentTableState = TableState & Partial> & { sortBy?: TableSort[]; + pageSize?: number; };