fix(grid): sync cell details on mouse selection
This commit is contained in:
2 files changed
+12
-1
No files matched your search
@@ -6190,7 +6190,7 @@ function onTransposeCellContext(rowIndex: number, actualColIdx: number, event: M
|
||||
contextCell.value = item ? { rowId: item.id, rowIndex, col: actualColIdx } : null;
|
||||
}
|
||||
|
||||
watch([selectedRange, showCellDetail, isEditingDetail], () => {
|
||||
watch([selectedRange, showCellDetail, isEditingDetail, isSelectingCells], () => {
|
||||
if (isSelectingCells.value) return;
|
||||
const selectedCell = currentSelectedCellPosition();
|
||||
const target = linkedCellDetailTarget({
|
||||
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
import { readFileSync } from "node:fs";
|
||||
import { describe, expect, it } from "vitest";
|
||||
|
||||
const dataGridSource = readFileSync(new URL("../DataGrid.vue", import.meta.url), "utf8");
|
||||
|
||||
describe("DataGrid cell detail selection", () => {
|
||||
it("resynchronizes the open detail after a mouse selection gesture finishes", () => {
|
||||
expect(dataGridSource).toContain("watch([selectedRange, showCellDetail, isEditingDetail, isSelectingCells]");
|
||||
expect(dataGridSource).toContain("if (isSelectingCells.value) return;");
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user