From e504d0c17539c3689aa3ce6e7c5aa5f6d11eb6fb Mon Sep 17 00:00:00 2001 From: t8y2 <1156263951@qq.com> Date: Sat, 6 Jun 2026 17:06:33 +0800 Subject: [PATCH] fix: sync transpose cell detail selection --- apps/desktop/src/components/grid/DataGrid.vue | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/apps/desktop/src/components/grid/DataGrid.vue b/apps/desktop/src/components/grid/DataGrid.vue index 8a8fe4d74..76be703e8 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(() => { 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)" >