fix: move connection columns control

This commit is contained in:
Tunglies
2026-05-10 13:21:06 +08:00
parent 3956b0d034
commit 753dad7c40
2 changed files with 15 additions and 28 deletions
+14 -1
View File
@@ -2,6 +2,7 @@ import {
DeleteForeverRounded,
TableChartRounded,
TableRowsRounded,
ViewColumnRounded,
} from '@mui/icons-material'
import {
Box,
@@ -10,6 +11,7 @@ import {
Fab,
IconButton,
MenuItem,
Tooltip,
Zoom,
} from '@mui/material'
import { useLockFn } from 'ahooks'
@@ -228,6 +230,18 @@ const ConnectionsPage = () => {
>
<BaseSearchBox onSearch={handleSearch} />
</Box>
{isTableLayout && hasTableData && (
<Tooltip title={t('connections.components.columnManager.title')}>
<IconButton
size="small"
aria-label={t('connections.components.columnManager.title')}
onClick={() => setIsColumnManagerOpen(true)}
sx={{ flex: '0 0 auto' }}
>
<ViewColumnRounded fontSize="small" />
</IconButton>
</Tooltip>
)}
</Box>
{!hasTableData ? (
@@ -239,7 +253,6 @@ const ConnectionsPage = () => {
detailRef.current?.open(detail, connectionsType === 'closed')
}
columnManagerOpen={isTableLayout && isColumnManagerOpen}
onOpenColumnManager={() => setIsColumnManagerOpen(true)}
onCloseColumnManager={() => setIsColumnManagerOpen(false)}
/>
) : (