fix(grid): keep restored sort out of where clause

This commit is contained in:
Eve authored and GitHub committed 2026-09-08 11:50:26 +08:00
1 parent 4b64656069
commit 80cd461ea1
2 files changed
+4 -3

No files matched your search

@@ -939,7 +939,7 @@ function refreshQueryEditorCompletionCache(): boolean {
function reloadUnavailableDataTab() {
const { whereInput, orderBy } = restoredDataTabReloadFilters(props.activeTab);
emit("reload", props.activeTab.id, undefined, whereInput, orderBy);
emit("reload", props.activeTab.id, undefined, undefined, whereInput, orderBy);
}
function refreshData(): boolean {
@@ -15,7 +15,8 @@ describe("ContentArea restored data-tab refresh", () => {
it("passes the restored tab's own WHERE/ORDER BY into the reload event", () => {
expect(contentAreaSource).toContain("const { whereInput, orderBy } = restoredDataTabReloadFilters(props.activeTab);");
// tabId-first contract: the reload event carries the owning tab's id.
expect(contentAreaSource).toContain(`emit("reload", props.activeTab.id, undefined, whereInput, orderBy);`);
// The tabId-first contract still reserves the sql and searchText slots before
// the restored filters. Omitting either placeholder shifts ORDER BY into WHERE.
expect(contentAreaSource).toContain(`emit("reload", props.activeTab.id, undefined, undefined, whereInput, orderBy);`);
});
});