Skip to content

Commit 2ac22c9

Browse files
[TablePagination] Allow the MenuItem customization (#11200)
1 parent 690bc0a commit 2ac22c9

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

packages/material-ui/src/Table/TablePagination.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ export type TablePaginationClassKey =
3434
| 'root'
3535
| 'toolbar'
3636
| 'spacer'
37+
| 'menuItem'
3738
| 'caption'
3839
| 'input'
3940
| 'selectRoot'

packages/material-ui/src/Table/TablePagination.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ export const styles = theme => ({
2727
spacer: {
2828
flex: '1 1 100%',
2929
},
30+
menuItem: {},
3031
caption: {
3132
flexShrink: 0,
3233
},
@@ -115,7 +116,11 @@ class TablePagination extends React.Component {
115116
{...SelectProps}
116117
>
117118
{rowsPerPageOptions.map(rowsPerPageOption => (
118-
<MenuItem key={rowsPerPageOption} value={rowsPerPageOption}>
119+
<MenuItem
120+
className={classes.menuItem}
121+
key={rowsPerPageOption}
122+
value={rowsPerPageOption}
123+
>
119124
{rowsPerPageOption}
120125
</MenuItem>
121126
))}

pages/api/table-pagination.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ This property accepts the following keys:
3636
- `root`
3737
- `toolbar`
3838
- `spacer`
39+
- `menuItem`
3940
- `caption`
4041
- `input`
4142
- `selectRoot`

0 commit comments

Comments
 (0)