Skip to content

Commit

Permalink
Merge pull request #1483 from Availity/docs/table-sorting
Browse files Browse the repository at this point in the history
docs(table): add pageSize to CurrentTableState type
  • Loading branch information
gregmartDOTin authored Nov 4, 2024
2 parents 1d87537 + 84fe340 commit eb33145
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docusaurus/docs/components/table/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`

Expand Down
1 change: 1 addition & 0 deletions packages/table/src/types/ReactTable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,4 +100,5 @@ export type TableInstance<T extends IdType> = UseSortByInstanceProps<T> &
export type CurrentTableState<T extends IdType> = TableState &
Partial<UseRowSelectState<T>> & {
sortBy?: TableSort[];
pageSize?: number;
};

0 comments on commit eb33145

Please sign in to comment.