paginaiton fix
This commit is contained in:
1 parent
71575a9d86
commit
07b08d0037
1 file changed
+22
-14
@@ -270,7 +270,10 @@ function TablePaginationActions(props: TablePaginationActionsProps) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Box sx={{ flexShrink: 0, ml: 2.5 }} className="table-pagination-actions">
|
<Box
|
||||||
|
sx={{ flexShrink: 0, ml: { xs: 0, md: 2.5 } }}
|
||||||
|
className="table-pagination-actions"
|
||||||
|
>
|
||||||
<IconButton
|
<IconButton
|
||||||
onClick={handleFirstPageButtonClick}
|
onClick={handleFirstPageButtonClick}
|
||||||
disabled={page === 0}
|
disabled={page === 0}
|
||||||
@@ -328,9 +331,18 @@ export const Pagination: React.FC<TablePaginationProps> = ({ ...props }) => {
|
|||||||
rowsPerPageOptions={[5, 10, 25]}
|
rowsPerPageOptions={[5, 10, 25]}
|
||||||
{...props}
|
{...props}
|
||||||
sx={{
|
sx={{
|
||||||
"& .MuiTablePagination-toolbar": {
|
"& .MuiTablePagination-toolbar": isSmall
|
||||||
display: isSmall ? "grid" : "flex",
|
? {
|
||||||
},
|
display: "grid",
|
||||||
|
gridTemplateColumns: "1fr 1fr",
|
||||||
|
gridAutoRows: "auto",
|
||||||
|
rowGap: theme.spacing(1),
|
||||||
|
alignItems: "center",
|
||||||
|
justifyItems: "center",
|
||||||
|
paddingLeft: 0,
|
||||||
|
paddingRight: 0,
|
||||||
|
}
|
||||||
|
: { display: "flex", alignItems: "center" },
|
||||||
"& .MuiTablePagination-selectLabel": {
|
"& .MuiTablePagination-selectLabel": {
|
||||||
gridColumn: "1",
|
gridColumn: "1",
|
||||||
gridRow: "1",
|
gridRow: "1",
|
||||||
@@ -341,16 +353,12 @@ export const Pagination: React.FC<TablePaginationProps> = ({ ...props }) => {
|
|||||||
gridRow: "1",
|
gridRow: "1",
|
||||||
justifySelf: "center",
|
justifySelf: "center",
|
||||||
},
|
},
|
||||||
"& .MuiTablePagination-displayedRows": {
|
"& .MuiTablePagination-displayedRows": isSmall
|
||||||
gridColumn: "2",
|
? { gridColumn: "1 / span 2", gridRow: "2", justifySelf: "center" }
|
||||||
gridRow: "2",
|
: {},
|
||||||
justifySelf: "center ",
|
"& .table-pagination-actions": isSmall
|
||||||
},
|
? { gridColumn: "1 / span 2", gridRow: "3", justifySelf: "center" }
|
||||||
"& .table-pagination-actions": {
|
: {},
|
||||||
gridColumn: "1",
|
|
||||||
gridRow: "2",
|
|
||||||
justifySelf: "center",
|
|
||||||
},
|
|
||||||
"& .MuiSelect-select": {
|
"& .MuiSelect-select": {
|
||||||
border: 1,
|
border: 1,
|
||||||
borderColor: theme.palette.divider,
|
borderColor: theme.palette.divider,
|
||||||
|
|||||||
Reference in new issue
Block a user