Skip to content

Commit

Permalink
[DataGrid] Fix warning with v5 (#1038)
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari authored Feb 15, 2021
1 parent 0115f60 commit e713ad3
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion packages/grid/_modules_/grid/components/Pagination.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ import { isMuiV5 } from '../utils';

// Used to hide the Rows per page selector on small devices
const useStyles = makeStyles((theme: Theme) => ({
selectLabel: {
display: 'none',
[theme.breakpoints.up('md')]: {
display: 'block',
},
},
caption: {
// input label
'&[id]': {
Expand Down Expand Up @@ -64,7 +70,10 @@ export function Pagination() {
return (
// @ts-ignore TODO remove once upgraded v4 support is dropped
<TablePagination
classes={classes}
classes={{
...(isMuiV5() ? { selectLabel: classes.selectLabel } : { caption: classes.caption }),
input: classes.input,
}}
component="div"
count={paginationState.rowCount}
page={paginationState.page}
Expand Down

0 comments on commit e713ad3

Please sign in to comment.