unhide columns when xs mode

This commit is contained in:
Henry
2023-11-17 12:44:16 +00:00
parent 5d7febc5c6
commit 0b4bf01931
2 changed files with 7 additions and 14 deletions
@@ -51,13 +51,13 @@ export const FlowListTable = ({ data, images, filterFunction, updateFlowsApi })
<StyledTableCell style={{ width: '25%' }} key='1'> <StyledTableCell style={{ width: '25%' }} key='1'>
Category Category
</StyledTableCell> </StyledTableCell>
<StyledTableCell sx={{ display: { xs: 'none', sm: 'table-cell' } }} style={{ width: '30%' }} key='2'> <StyledTableCell style={{ width: '30%' }} key='2'>
Nodes Nodes
</StyledTableCell> </StyledTableCell>
<StyledTableCell sx={{ display: { xs: 'none', sm: 'table-cell' } }} style={{ width: '15%' }} key='3'> <StyledTableCell style={{ width: '15%' }} key='3'>
Last Modified Date Last Modified Date
</StyledTableCell> </StyledTableCell>
<StyledTableCell sx={{ display: { xs: 'none', sm: 'table-cell' } }} style={{ width: '10%' }} key='4'> <StyledTableCell style={{ width: '10%' }} key='4'>
Actions Actions
</StyledTableCell> </StyledTableCell>
</TableRow> </TableRow>
@@ -90,7 +90,7 @@ export const FlowListTable = ({ data, images, filterFunction, updateFlowsApi })
))} ))}
</div> </div>
</TableCell> </TableCell>
<TableCell sx={{ display: { xs: 'none', sm: 'table-cell' } }} key='2'> <TableCell key='2'>
{images[row.id] && ( {images[row.id] && (
<div <div
style={{ style={{
@@ -129,10 +129,8 @@ export const FlowListTable = ({ data, images, filterFunction, updateFlowsApi })
</div> </div>
)} )}
</TableCell> </TableCell>
<TableCell sx={{ display: { xs: 'none', sm: 'table-cell' } }} key='3'> <TableCell key='3'>{moment(row.updatedDate).format('MMMM Do, YYYY')}</TableCell>
{moment(row.updatedDate).format('MMMM Do, YYYY')} <TableCell key='4'>
</TableCell>
<TableCell sx={{ display: { xs: 'none', sm: 'table-cell' } }} key='4'>
<Stack direction={{ xs: 'column', sm: 'row' }} spacing={1} justifyContent='center' alignItems='center'> <Stack direction={{ xs: 'column', sm: 'row' }} spacing={1} justifyContent='center' alignItems='center'>
<FlowListMenu chatflow={row} updateFlowsApi={updateFlowsApi} /> <FlowListMenu chatflow={row} updateFlowsApi={updateFlowsApi} />
</Stack> </Stack>
+1 -6
View File
@@ -152,12 +152,7 @@ const Chatflows = () => {
/> />
<Box sx={{ flexGrow: 1 }} /> <Box sx={{ flexGrow: 1 }} />
<ButtonGroup sx={{ maxHeight: 40 }} disableElevation variant='contained' aria-label='outlined primary button group'> <ButtonGroup sx={{ maxHeight: 40 }} disableElevation variant='contained' aria-label='outlined primary button group'>
<ButtonGroup <ButtonGroup disableElevation variant='contained' aria-label='outlined primary button group'>
sx={{ display: { xs: 'none', sm: 'block' } }}
disableElevation
variant='contained'
aria-label='outlined primary button group'
>
<ToggleButtonGroup sx={{ maxHeight: 40 }} value={view} color='primary' exclusive onChange={handleChange}> <ToggleButtonGroup sx={{ maxHeight: 40 }} value={view} color='primary' exclusive onChange={handleChange}>
<ToggleButton <ToggleButton
sx={{ color: theme?.customization?.isDarkMode ? 'white' : 'inherit' }} sx={{ color: theme?.customization?.isDarkMode ? 'white' : 'inherit' }}