diff --git a/docs/src/pages/components/tables/EnhancedTable.js b/docs/src/pages/components/tables/EnhancedTable.js index 53d003e983ad85..f1517a71619ec5 100644 --- a/docs/src/pages/components/tables/EnhancedTable.js +++ b/docs/src/pages/components/tables/EnhancedTable.js @@ -140,14 +140,8 @@ const useToolbarStyles = makeStyles(theme => ({ color: theme.palette.text.primary, backgroundColor: theme.palette.secondary.dark, }, - spacer: { - flex: '1 1 100%', - }, - actions: { - color: theme.palette.text.secondary, - }, title: { - flex: '0 0 auto', + flex: '1 1 100%', }, })); @@ -161,33 +155,29 @@ const EnhancedTableToolbar = props => { [classes.highlight]: numSelected > 0, })} > -
- {numSelected > 0 ? ( - - {numSelected} selected - - ) : ( - - Nutrition - - )} -
-
-
- {numSelected > 0 ? ( - - - - - - ) : ( - - - - - - )} -
+ {numSelected > 0 ? ( + + {numSelected} selected + + ) : ( + + Nutrition + + )} + + {numSelected > 0 ? ( + + + + + + ) : ( + + + + + + )} ); }; @@ -273,7 +263,7 @@ export default function EnhancedTable() { }; const handleChangeRowsPerPage = event => { - setRowsPerPage(+event.target.value); + setRowsPerPage(parseInt(event.target.value, 10)); setPage(0); }; diff --git a/docs/src/pages/components/tables/EnhancedTable.tsx b/docs/src/pages/components/tables/EnhancedTable.tsx index 4c384d073194ce..25eeed71ee89f7 100644 --- a/docs/src/pages/components/tables/EnhancedTable.tsx +++ b/docs/src/pages/components/tables/EnhancedTable.tsx @@ -166,14 +166,8 @@ const useToolbarStyles = makeStyles((theme: Theme) => color: theme.palette.text.primary, backgroundColor: theme.palette.secondary.dark, }, - spacer: { - flex: '1 1 100%', - }, - actions: { - color: theme.palette.text.secondary, - }, title: { - flex: '0 0 auto', + flex: '1 1 100%', }, }), ); @@ -192,33 +186,28 @@ const EnhancedTableToolbar = (props: EnhancedTableToolbarProps) => { [classes.highlight]: numSelected > 0, })} > -
- {numSelected > 0 ? ( - - {numSelected} selected - - ) : ( - - Nutrition - - )} -
-
-
- {numSelected > 0 ? ( - - - - - - ) : ( - - - - - - )} -
+ {numSelected > 0 ? ( + + {numSelected} selected + + ) : ( + + Nutrition + + )} + {numSelected > 0 ? ( + + + + + + ) : ( + + + + + + )} ); }; @@ -302,7 +291,7 @@ export default function EnhancedTable() { }; const handleChangeRowsPerPage = (event: React.ChangeEvent) => { - setRowsPerPage(+event.target.value); + setRowsPerPage(parseInt(event.target.value, 10)); setPage(0); };