mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-25 00:07:47 +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',
|
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,23 +211,25 @@ 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>
|
||||||
<Table {...getTableProps()}>
|
<TableContainer>
|
||||||
<SortableTableHeader headerGroups={headerGroups} />
|
<Table {...getTableProps()}>
|
||||||
<TableBody {...getTableBodyProps()}>
|
<SortableTableHeader headerGroups={headerGroups} />
|
||||||
{rows.map((row) => {
|
<TableBody {...getTableBodyProps()}>
|
||||||
prepareRow(row);
|
{rows.map((row) => {
|
||||||
return (
|
prepareRow(row);
|
||||||
<TableRow hover {...row.getRowProps()}>
|
return (
|
||||||
{row.cells.map((cell) => (
|
<TableRow hover {...row.getRowProps()}>
|
||||||
<TableCell {...cell.getCellProps()}>
|
{row.cells.map((cell) => (
|
||||||
{cell.render('Cell')}
|
<TableCell {...cell.getCellProps()}>
|
||||||
</TableCell>
|
{cell.render('Cell')}
|
||||||
))}
|
</TableCell>
|
||||||
</TableRow>
|
))}
|
||||||
);
|
</TableRow>
|
||||||
})}
|
);
|
||||||
</TableBody>
|
})}
|
||||||
</Table>
|
</TableBody>
|
||||||
|
</Table>
|
||||||
|
</TableContainer>
|
||||||
<ConditionallyRender
|
<ConditionallyRender
|
||||||
condition={rows.length === 0}
|
condition={rows.length === 0}
|
||||||
show={
|
show={
|
||||||
|
Loading…
Reference in New Issue
Block a user