1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-07-02 01:17:58 +02:00

feat: make table scrollable (#6632)

This commit is contained in:
Jaanus Sellin 2024-03-20 15:29:15 +02:00 committed by GitHub
parent 99b5db1691
commit 0c0530ddcf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -19,6 +19,9 @@ const Container = styled(Box)(({ theme }) => ({
display: 'flex', display: 'flex',
flexDirection: 'column', flexDirection: 'column',
gap: theme.spacing(2), gap: theme.spacing(2),
}));
const TableContainer = styled(Box)(({ theme }) => ({
overflowY: 'auto', overflowY: 'auto',
maxHeight: theme.spacing(45), maxHeight: theme.spacing(45),
})); }));
@ -208,6 +211,7 @@ export const LeadTimeForChanges = ({ leadTime }: ILeadTimeForChangesProps) => {
<Typography variant='h3'> <Typography variant='h3'>
Lead time for changes (per release flag) Lead time for changes (per release flag)
</Typography> </Typography>
<TableContainer>
<Table {...getTableProps()}> <Table {...getTableProps()}>
<SortableTableHeader headerGroups={headerGroups} /> <SortableTableHeader headerGroups={headerGroups} />
<TableBody {...getTableBodyProps()}> <TableBody {...getTableBodyProps()}>
@ -225,6 +229,7 @@ export const LeadTimeForChanges = ({ leadTime }: ILeadTimeForChangesProps) => {
})} })}
</TableBody> </TableBody>
</Table> </Table>
</TableContainer>
<ConditionallyRender <ConditionallyRender
condition={rows.length === 0} condition={rows.length === 0}
show={ show={