From 07b08d0037124c8f71dc3e791803fd0648803033 Mon Sep 17 00:00:00 2001 From: Alex Holliday Date: Mon, 15 Dec 2025 20:31:37 +0000 Subject: [PATCH] paginaiton fix --- .../src/components/design-elements/Table.tsx | 36 +++++++++++-------- 1 file changed, 22 insertions(+), 14 deletions(-) diff --git a/client/src/components/design-elements/Table.tsx b/client/src/components/design-elements/Table.tsx index 08eb588f6..97773b1a7 100644 --- a/client/src/components/design-elements/Table.tsx +++ b/client/src/components/design-elements/Table.tsx @@ -270,7 +270,10 @@ function TablePaginationActions(props: TablePaginationActionsProps) { }; return ( - + = ({ ...props }) => { rowsPerPageOptions={[5, 10, 25]} {...props} sx={{ - "& .MuiTablePagination-toolbar": { - display: isSmall ? "grid" : "flex", - }, + "& .MuiTablePagination-toolbar": isSmall + ? { + 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": { gridColumn: "1", gridRow: "1", @@ -341,16 +353,12 @@ export const Pagination: React.FC = ({ ...props }) => { gridRow: "1", justifySelf: "center", }, - "& .MuiTablePagination-displayedRows": { - gridColumn: "2", - gridRow: "2", - justifySelf: "center ", - }, - "& .table-pagination-actions": { - gridColumn: "1", - gridRow: "2", - justifySelf: "center", - }, + "& .MuiTablePagination-displayedRows": isSmall + ? { gridColumn: "1 / span 2", gridRow: "2", justifySelf: "center" } + : {}, + "& .table-pagination-actions": isSmall + ? { gridColumn: "1 / span 2", gridRow: "3", justifySelf: "center" } + : {}, "& .MuiSelect-select": { border: 1, borderColor: theme.palette.divider,