Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pages/api/table-pagination.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ A `TableCell` based component for placing inside `TableFooter` for pagination.
| labelDisplayedRows | func | ({ from, to, count }) => `${from}-${to} of ${count}` | Useful to customize the displayed rows label. |
| labelRowsPerPage | node | 'Rows per page:' | Useful to customize the rows per page label. Invoked with a `{ from, to, count, page }` object. |
| <span style="color: #31a148">onChangePage *</span> | func | | Callback fired when the page is changed.<br><br>**Signature:**<br>`function(event: object, page: number) => void`<br>*event:* The event source of the callback<br>*page:* The page selected |
| <span style="color: #31a148">onChangeRowsPerPage *</span> | func | | Callback fired when the number of rows per page is changed.<br><br>**Signature:**<br>`function(event: object) => void`<br>*event:* The event source of the callback |
| onChangeRowsPerPage | func | | Callback fired when the number of rows per page is changed.<br><br>**Signature:**<br>`function(event: object) => void`<br>*event:* The event source of the callback |
| <span style="color: #31a148">page *</span> | number | | The zero-based index of the current page. |
| <span style="color: #31a148">rowsPerPage *</span> | number | | The number of rows per page. |
| rowsPerPageOptions | array | [5, 10, 25] | Customizes the options of the rows per page select field. If less than two options are available, no select field will be displayed. |
Expand Down
2 changes: 1 addition & 1 deletion src/Table/TablePagination.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export interface TablePaginationProps extends StandardProps<
labelDisplayedRows?: (paginationInfo: LabelDisplayedRowsArgs) => React.ReactNode;
labelRowsPerPage?: React.ReactNode;
onChangePage: (event: React.MouseEvent<HTMLButtonElement> | null, page: number) => void;
onChangeRowsPerPage: React.ChangeEventHandler<HTMLTextAreaElement | HTMLInputElement>;
onChangeRowsPerPage?: React.ChangeEventHandler<HTMLTextAreaElement | HTMLInputElement>;
page: number;
rowsPerPage: number;
rowsPerPageOptions?: number[];
Expand Down
2 changes: 1 addition & 1 deletion src/Table/TablePagination.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ TablePagination.propTypes = {
*
* @param {object} event The event source of the callback
*/
onChangeRowsPerPage: PropTypes.func.isRequired,
onChangeRowsPerPage: PropTypes.func,
/**
* The zero-based index of the current page.
*/
Expand Down