Skip to content

armgit / dbx

Public Imported from GitHub
0

25 MB lightweight cross-platform database client for 100+ databases, including MySQL, PostgreSQL, SQLite, Redis, MongoDB, DuckDB, SQL Server, and Dameng. Built-in AI, MCP Server, CLI, desktop and Docker. | 轻量级跨平台数据库管理工具,支持 MySQL、PostgreSQL、SQLite、Redis、MongoDB、达梦等 100+ 数据库,提供桌面端、Docker、CLI、内置 AI 助手和 MCP。

fix: sync transpose cell detail selection

t8y2e504d0c17539
diff --git a/apps/desktop/src/components/grid/DataGrid.vue b/apps/desktop/src/components/grid/DataGrid.vue
index 8a8fe4d742..76be703e8f 100644
--- a/apps/desktop/src/components/grid/DataGrid.vue
+++ b/apps/desktop/src/components/grid/DataGrid.vue
@@ -3896,6 +3896,17 @@ function selectTransposeCell(rowIndex: number, actualColIdx: number, event: Mous
selectSingleCell(rowIndex, visibleColIdx);
}
transposeRowIndex.value = rowIndex;
+ gridRef.value?.focus({ preventScroll: true });
+}
+
+function showTransposeCellDetails(rowIndex: number, actualColIdx: number) {
+ const visibleColIdx = visibleColumnIndexes.value.indexOf(actualColIdx);
+ if (visibleColIdx < 0) return;
+ contextHeaderColumn.value = null;
+ contextHeaderColumnIndex.value = null;
+ clearRowSelection();
+ selectSingleCell(rowIndex, visibleColIdx);
+ transposeRowIndex.value = rowIndex;
showCellDetails(rowIndex, actualColIdx);
gridRef.value?.focus({ preventScroll: true });
}
@@ -6327,7 +6338,7 @@ const gridContextMenuItems = computed<ContextMenuItem[]>(() => {
class="flex h-5 w-5 items-center justify-center rounded bg-background/90 text-muted-foreground shadow-sm ring-1 ring-border hover:text-foreground"
:title="t('grid.cellDetails')"
@mousedown.stop
- @click.stop="showCellDetails(cell.recordIndex, cell.valueIndex)"
+ @click.stop="showTransposeCellDetails(cell.recordIndex, cell.valueIndex)"
>
<Info class="h-3 w-3" />
</button>