Skip to content

Commit 67a77cb

Browse files
committed
Fix tables errors
1 parent 7eb39b3 commit 67a77cb

File tree

1 file changed

+21
-19
lines changed

1 file changed

+21
-19
lines changed

src/pages/tables/dynamic/DynamicTables.js

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -41,22 +41,22 @@ const useStyles1 = makeStyles(theme => ({
4141
function TablePaginationActions(props) {
4242
const classes = useStyles1();
4343
const theme = useTheme();
44-
const { count, page, rowsPerPage, onChangePage } = props;
44+
const { count, page, rowsPerPage, onPageChange } = props;
4545

4646
function handleFirstPageButtonClick(event) {
47-
onChangePage(event, 0);
47+
onPageChange(event, 0);
4848
}
4949

5050
function handleBackButtonClick(event) {
51-
onChangePage(event, page - 1);
51+
onPageChange(event, page - 1);
5252
}
5353

5454
function handleNextButtonClick(event) {
55-
onChangePage(event, page + 1);
55+
onPageChange(event, page + 1);
5656
}
5757

5858
function handleLastPageButtonClick(event) {
59-
onChangePage(event, Math.max(0, Math.ceil(count / rowsPerPage) - 1));
59+
onPageChange(event, Math.max(0, Math.ceil(count / rowsPerPage) - 1));
6060
}
6161

6262
return (
@@ -577,20 +577,22 @@ export default function EnhancedTable() {
577577
)}
578578
</TableBody>
579579
<TableFooter>
580-
<TablePagination
581-
rowsPerPageOptions={[5, 10, 25]}
582-
colSpan={3}
583-
count={rows2.length}
584-
rowsPerPage={rowsPerPage2}
585-
page={page2}
586-
SelectProps={{
587-
inputProps: { "aria-label": "rows per page" },
588-
native: true
589-
}}
590-
onPageChange={handleChangePage2}
591-
onRowsPerPageChange={handleChangeRowsPerPage2}
592-
ActionsComponent={TablePaginationActions}
593-
/>
580+
<TableRow>
581+
<TablePagination
582+
rowsPerPageOptions={[5, 10, 25]}
583+
colSpan={3}
584+
count={rows2.length}
585+
rowsPerPage={rowsPerPage2}
586+
page={page2}
587+
SelectProps={{
588+
inputProps: { "aria-label": "rows per page" },
589+
native: true
590+
}}
591+
onPageChange={handleChangePage2}
592+
onRowsPerPageChange={handleChangeRowsPerPage2}
593+
ActionsComponent={TablePaginationActions}
594+
/>
595+
</TableRow>
594596
</TableFooter>
595597
</Table>
596598
</div>

0 commit comments

Comments
 (0)