mirror of
https://github.com/Unleash/unleash.git
synced 2024-10-28 19:06:12 +01:00
feat: make table scrollable (#6632)
This commit is contained in:
parent
99b5db1691
commit
0c0530ddcf
@ -19,6 +19,9 @@ const Container = styled(Box)(({ theme }) => ({
|
||||
display: 'flex',
|
||||
flexDirection: 'column',
|
||||
gap: theme.spacing(2),
|
||||
}));
|
||||
|
||||
const TableContainer = styled(Box)(({ theme }) => ({
|
||||
overflowY: 'auto',
|
||||
maxHeight: theme.spacing(45),
|
||||
}));
|
||||
@ -208,23 +211,25 @@ export const LeadTimeForChanges = ({ leadTime }: ILeadTimeForChangesProps) => {
|
||||
<Typography variant='h3'>
|
||||
Lead time for changes (per release flag)
|
||||
</Typography>
|
||||
<Table {...getTableProps()}>
|
||||
<SortableTableHeader headerGroups={headerGroups} />
|
||||
<TableBody {...getTableBodyProps()}>
|
||||
{rows.map((row) => {
|
||||
prepareRow(row);
|
||||
return (
|
||||
<TableRow hover {...row.getRowProps()}>
|
||||
{row.cells.map((cell) => (
|
||||
<TableCell {...cell.getCellProps()}>
|
||||
{cell.render('Cell')}
|
||||
</TableCell>
|
||||
))}
|
||||
</TableRow>
|
||||
);
|
||||
})}
|
||||
</TableBody>
|
||||
</Table>
|
||||
<TableContainer>
|
||||
<Table {...getTableProps()}>
|
||||
<SortableTableHeader headerGroups={headerGroups} />
|
||||
<TableBody {...getTableBodyProps()}>
|
||||
{rows.map((row) => {
|
||||
prepareRow(row);
|
||||
return (
|
||||
<TableRow hover {...row.getRowProps()}>
|
||||
{row.cells.map((cell) => (
|
||||
<TableCell {...cell.getCellProps()}>
|
||||
{cell.render('Cell')}
|
||||
</TableCell>
|
||||
))}
|
||||
</TableRow>
|
||||
);
|
||||
})}
|
||||
</TableBody>
|
||||
</Table>
|
||||
</TableContainer>
|
||||
<ConditionallyRender
|
||||
condition={rows.length === 0}
|
||||
show={
|
||||
|
Loading…
Reference in New Issue
Block a user