@@ -9,7 +9,7 @@ import Paper, { PaperProps } from '@mui/material/Paper';
99import Box from '@mui/material/Box' ;
1010import { useResponsive } from 'shared/hooks' ;
1111import { Item , Module , SubModule } from 'shared/models' ;
12- import { CUSTOM_STYLES } from 'shared/themes ' ;
12+ import { APP_CONFIG } from 'shared/constants ' ;
1313import Page from 'components/UI/Page' ;
1414import { Column } from './table.model' ;
1515import { StyledTable } from './StyledTable' ;
@@ -81,12 +81,14 @@ const Table = <T extends Item>({
8181 pb : 1 ,
8282 pl : 3 ,
8383 position : 'relative' ,
84- height : CUSTOM_STYLES . scrollableContentHeight ,
84+ height : APP_CONFIG . scrollableContentHeight ,
85+ maxWidth : '100%' ,
86+ width : APP_CONFIG . table . containerWidth ,
8587 } }
8688 { ...props }
8789 >
8890 { isMobile ? (
89- < Box sx = { { flexGrow : 1 , maxHeight : 'calc(100% - 70px)' , overflow : 'auto' } } >
91+ < Box sx = { { flexGrow : 1 , maxHeight : APP_CONFIG . table . containerMaxHeight , overflow : 'auto' } } >
9092 { noData ? (
9193 renderEmptyState ( )
9294 ) : (
@@ -98,16 +100,16 @@ const Table = <T extends Item>({
98100 ) }
99101 </ Box >
100102 ) : (
101- < TableContainer sx = { { flexGrow : 1 , maxHeight : 'calc(100% - 70px)' } } >
102- < StyledTable stickyHeader >
103+ < TableContainer sx = { { flexGrow : 1 , maxHeight : APP_CONFIG . table . containerMaxHeight } } >
104+ < StyledTable stickyHeader sx = { { minWidth : `calc( ${ APP_CONFIG . containerWidth } px - 34px)` } } aria-label = "table" >
103105 < TableHead >
104106 < TableRow >
105107 { columns . map ( ( column ) => (
106108 < TableCell
107109 data-cy = { `${ module } -${ subModule } -table-header-cell-${ column . field } ` }
108110 key = { column . field }
109111 align = { column . align || 'left' }
110- sx = { { width : column . width , fontSize : 16 } }
112+ sx = { { width : column . width || 'auto' , ... column . sx } }
111113 >
112114 { column . name }
113115 </ TableCell >
0 commit comments