TablePagination API
The API documentation of the TablePagination React component. Learn more about the properties and the CSS customization points.
import TablePagination from '@material-ui/core/TablePagination';
A TableCell
based component for placing inside TableFooter
for pagination.
Props
Name | Type | Default | Description |
---|---|---|---|
ActionsComponent | elementType | TablePaginationActions | The component used for displaying the actions. Either a string to use a DOM element or a component. |
backIconButtonProps | object | Properties applied to the back arrow IconButton component. |
|
classes | object | Override or extend the styles applied to the component. See CSS API below for more details. | |
component | elementType | TableCell | The component used for the root node. Either a string to use a DOM element or a component. |
count * | number | The total number of rows. | |
labelDisplayedRows | func | ({ from, to, count }) => ${from}-${to} of ${count} |
Customize the displayed rows label. |
labelRowsPerPage | node | 'Rows per page:' | Customize the rows per page label. Invoked with a { from, to, count, page } object. |
nextIconButtonProps | object | Properties applied to the next arrow IconButton element. |
|
onChangePage * | func | Callback fired when the page is changed. Signature: function(event: object, page: number) => void event: The event source of the callback page: The page selected |
|
onChangeRowsPerPage | func | Callback fired when the number of rows per page is changed. Signature: function(event: object) => void event: The event source of the callback |
|
page * | number | The zero-based index of the current page. | |
rowsPerPage * | number | The number of rows per page. | |
rowsPerPageOptions | array | [10, 25, 50, 100] | Customizes the options of the rows per page select field. If less than two options are available, no select field will be displayed. |
SelectProps | object | {} | Properties applied to the rows per page Select element. |
The ref
is forwarded to the root element.
Any other properties supplied will be provided to the root element (TableCell).
CSS
You can override all the class names injected by Material-UI thanks to the classes
property.
This property accepts the following keys:
Name | Description |
---|---|
root | Styles applied to the root element. |
toolbar | Styles applied to the Toolbar component. |
spacer | Styles applied to the spacer element. |
caption | Styles applied to the caption Typography components if variant="caption" . |
selectRoot | Styles applied to the Select component root class. |
select | Styles applied to the Select component select class. |
selectIcon | Styles applied to the Select component icon class. |
input | Styles applied to the InputBase component. |
menuItem | Styles applied to the MenuItem component. |
actions | Styles applied to the internal TablePaginationActions component. |
Have a look at the overriding styles with classes section and the implementation of the component for more detail.
If using the overrides
key of the theme,
you need to use the following style sheet name: MuiTablePagination
.
Inheritance
The properties of the TableCell component are also available. You can take advantage of this behavior to target nested components.
Notes
The component can cause issues in StrictMode.