diff --git a/src/inputs/Table/Table.js b/src/inputs/Table/Table.js index 8c14835f..558aac43 100644 --- a/src/inputs/Table/Table.js +++ b/src/inputs/Table/Table.js @@ -55,7 +55,6 @@ const useStyles = makeStyles((theme) => ({ right: 'auto', bottom: 'auto', position: 'fixed', - height: '100%', width: '100%', // z-index for the fullscreen container must be higher than 1200 to hide the app bar and drawers, but lower than // 1300 to still appear under modals & tooltips (see https://mui.com/material-ui/customization/z-index/ for details) @@ -65,25 +64,24 @@ const useStyles = makeStyles((theme) => ({ border: theme.spacing(2) + ' solid', borderColor: 'var(--ag-odd-row-background-color)', backgroundColor: 'var(--ag-odd-row-background-color)', - height: '100%', overflow: 'scroll', }, - emptyTablePlaceholderDiv: { + tablePlaceholderWrapper: { + height: '100%', + display: 'flex', + flexFlow: 'row nowrap', + justifyContent: 'center', + alignItems: 'center', + }, + tablePlaceholderDiv: { textAlign: 'center', - maxHeight: '200px', - maxWidth: '390px', - margin: '0px', - position: 'relative', - top: '50%', - left: '50%', - msTransform: 'translate(-50%, -50%)', - transform: 'translate(-50%, -50%)', + margin: theme.spacing(2), }, - emptyTablePlaceholderTitle: { + tablePlaceholderTitle: { marginBottom: theme.spacing(1), whiteSpace: 'pre-line', }, - emptyTablePlaceholderBody: { + tablePlaceholderBody: { marginBottom: theme.spacing(1), }, errorsPanelFullscreen: { @@ -176,7 +174,6 @@ export const Table = (props) => { const fallbackRef = useRef(null); const gridRef = optionalGridRef || fallbackRef; - const dimensions = { height, width }; const classes = useStyles(); const isLoading = LOADING_STATUS_MAPPING[dataStatus]; const hasErrors = errors && errors.length > 0; @@ -306,35 +303,38 @@ export const Table = (props) => { visibilityOptions, ]); - const emptyTablePlaceholder = useMemo(() => { + const tablePlaceholder = useMemo(() => { return ( -