Skip to content

Commit c8f9d78

Browse files
committed
Styles | fixing vertical scroll on datagrid
1 parent 8748c66 commit c8f9d78

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

src/components/map-projects/MapProject.jsx

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4738,6 +4738,15 @@ const MapProject = () => {
47384738
}
47394739
}
47404740

4741+
const getGridHeightFactor = () => {
4742+
let minFactor = 253
4743+
if(project?.id)
4744+
minFactor += 10
4745+
if(selectedRowIds?.length)
4746+
minFactor += 52
4747+
return minFactor
4748+
}
4749+
47414750
return permissionDenied ? <Error403/> : (
47424751
<div className='col-xs-12 padding-0' style={{borderRadius: '10px', width: 'calc(100vw - 32px)'}}>
47434752
{
@@ -4979,7 +4988,7 @@ const MapProject = () => {
49794988
</Alert>
49804989
</Snackbar>
49814990
<div
4982-
style={{ width: '100%', height: project?.id ? 'calc(100vh - 263px)' : 'calc(100vh - 250px)' }}
4991+
style={{ width: '100%', height: `calc(100vh - ${getGridHeightFactor()}px)` }}
49834992
onPointerDownCapture={handleGridPointerDownCapture}
49844993
>
49854994
<DataGrid

0 commit comments

Comments
 (0)