fix(grid): 修复右键菜单选择时的单元格清理逻辑

感谢 @eryajf 的贡献!
This commit is contained in:
二丫讲梵 authored and GitHub committed 2026-06-09 15:45:20 +08:00
1 parent 9c8a1c62b7
commit 7798f2231e
2 files changed
+33 -1

No files matched your search

@@ -5178,6 +5178,7 @@ function onCellContext(rowId: number, rowIndex: number, colIdx: number, visibleC
contextHeaderColumnIndex.value = null;
contextCell.value = { rowId, rowIndex, col: colIdx };
if (hasRowSelection.value && isRowSelected(rowId)) {
clearCellSelection();
void prefetchCopyStatements();
return;
}
@@ -5192,6 +5193,9 @@ function onRowContext(rowId: number, rowIndex: number) {
contextHeaderColumn.value = null;
contextHeaderColumnIndex.value = null;
contextCell.value = { rowId, rowIndex, col: -1 };
if (hasRowSelection.value && isRowSelected(rowId)) {
clearCellSelection();
}
if (!isRowSelected(rowId)) {
clearCellSelection();
selectedRowIds.value = new Set([rowId]);