fix(grid): reset query result sorting on rerun

This commit is contained in:
zipg authored and GitHub committed 2026-07-21 17:29:47 +08:00
1 parent cdfcbad4e9
commit 423d20bdd7
3 files changed
+36 -5

No files matched your search

+8
View File
@@ -2357,6 +2357,14 @@ export const useQueryStore = defineStore("query", () => {
async function executeCurrentSql(sql: string, options?: { skipRedisSafetyCheck?: boolean; sourceOffset?: number }) {
if (!activeTabId.value) return;
const tab = tabs.value.find((item) => item.id === activeTabId.value);
if (tab?.mode === "query") {
tab.resultSortColumn = undefined;
tab.resultSortColumnIndex = undefined;
tab.resultSortDirection = undefined;
tab.resultSortMode = undefined;
tab.resultSortedSql = undefined;
}
await executeTabSql(activeTabId.value, sql, { resultBaseSql: sql, resultSortedSql: undefined, ...options });
}