Feature/user management
This commit is contained in:
44
src/core/components/DataTable/table/TableLoadingOverlay.js
Normal file
44
src/core/components/DataTable/table/TableLoadingOverlay.js
Normal file
@@ -0,0 +1,44 @@
|
||||
import { Box, CircularProgress } from "@mui/material";
|
||||
|
||||
const DataTable_TableLoadingOverlay = ({ table, ...rest }) => {
|
||||
const {
|
||||
options: {
|
||||
localization,
|
||||
mrtTheme: { baseBackgroundColor },
|
||||
muiCircularProgressProps,
|
||||
},
|
||||
} = table;
|
||||
|
||||
const circularProgressProps = {
|
||||
...parseFromValuesOrFunc(muiCircularProgressProps, { table }),
|
||||
...rest,
|
||||
};
|
||||
|
||||
return (
|
||||
<Box
|
||||
sx={{
|
||||
alignItems: "center",
|
||||
backgroundColor: alpha(baseBackgroundColor, 0.5),
|
||||
bottom: 0,
|
||||
display: "flex",
|
||||
justifyContent: "center",
|
||||
left: 0,
|
||||
maxHeight: "100vh",
|
||||
position: "absolute",
|
||||
right: 0,
|
||||
top: 0,
|
||||
width: "100%",
|
||||
zIndex: 3,
|
||||
}}
|
||||
>
|
||||
{circularProgressProps?.Component ?? (
|
||||
<CircularProgress
|
||||
aria-label={localization.noRecordsToDisplay}
|
||||
id="mrt-progress"
|
||||
{...circularProgressProps}
|
||||
/>
|
||||
)}
|
||||
</Box>
|
||||
);
|
||||
};
|
||||
export default DataTable_TableLoadingOverlay;
|
||||
Reference in New Issue
Block a user