Re-do css on table skeleton, per changes in the included DataTable*Cell components

This commit is contained in:
2024-07-25 09:27:53 -05:00
parent 97bab57974
commit 9d5af539b9

View File

@ -93,41 +93,25 @@ function TableCard({noRowsFoundHTML, data, rowsPerPage, hidePaginationDropdown,
/> />
: noRowsFoundHTML ? : noRowsFoundHTML ?
<Box p={3} pt={0} pb={3} sx={{textAlign: "center"}}> <Box p={3} pt={0} pb={3} sx={{textAlign: "center"}}>
<MDTypography <MDTypography variant="subtitle2" color="secondary" fontWeight="regular">
variant="subtitle2" {noRowsFoundHTML ? (parse(noRowsFoundHTML)) : "No rows found"}
color="secondary"
fontWeight="regular"
>
{
noRowsFoundHTML ? (
parse(noRowsFoundHTML)
) : "No rows found"
}
</MDTypography> </MDTypography>
</Box> </Box>
: :
<TableContainer sx={{boxShadow: "none"}}> <TableContainer sx={{boxShadow: "none"}}>
<Table> <Table component="div" sx={{display: "grid", gridTemplateRows: "auto", gridTemplateColumns: "1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr"}}>
<Box component="thead"> {Array(8).fill(0).map((_, i) =>
<TableRow sx={{alignItems: "flex-end"}} key="header"> <DataTableHeadCell key={`head-${i}`} sorted={false} width="auto" align="center">
{Array(8).fill(0).map((_, i) => <Skeleton width="100%" />
<DataTableHeadCell key={`head-${i}`} sorted={false} width="auto" align="center"> </DataTableHeadCell>
<Skeleton width="100%" /> )}
</DataTableHeadCell> {Array(5).fill(0).map((_, i) =>
)} Array(8).fill(0).map((_, j) =>
</TableRow> <DataTableBodyCell key={`cell-${i}-${j}`} align="center">
</Box> <DefaultCell isFooter={false}><Skeleton /></DefaultCell>
<TableBody> </DataTableBodyCell>
{Array(5).fill(0).map((_, i) => )
<TableRow sx={{verticalAlign: "top"}} key={`row-${i}`}> )}
{Array(8).fill(0).map((_, j) =>
<DataTableBodyCell key={`cell-${i}-${j}`} align="center">
<DefaultCell isFooter={false}><Skeleton /></DefaultCell>
</DataTableBodyCell>
)}
</TableRow>
)}
</TableBody>
</Table> </Table>
</TableContainer> </TableContainer>
} }