fix(data-grid): scope SQL extractors to active context

This commit is contained in:
二丫讲梵 authored and GitHub committed 2026-08-17 01:51:19 +08:00
1 parent 50e6476cb0
commit 19e547fe52
4 files changed
+143 -9

No files matched your search

@@ -0,0 +1,13 @@
import { readFileSync } from "node:fs";
import { describe, expect, it } from "vitest";
const source = readFileSync(new URL("../DataGrid.vue", import.meta.url), "utf8");
describe("DataGrid context extractor lifecycle", () => {
it("clears the right-click target after the context-menu action has started", () => {
expect(source).toContain('@open="onGridContextMenuOpen"');
expect(source).toContain('@close="onGridContextMenuClose"');
expect(source).toContain("queueMicrotask(() => {");
expect(source).toContain("invalidateSyntheticContextSelection();");
});
});