fix(grid): preserve viewport during gutter execution
This commit is contained in:
1 parent
99ded5c8bb
commit
a6945a19f2
8 files changed
+131
-14
No files matched your search
@@ -3369,7 +3369,7 @@ export const useQueryStore = defineStore("query", () => {
|
||||
await executeCurrentSql(tab.sql);
|
||||
}
|
||||
|
||||
async function executeCurrentSql(sql: string, options?: { skipRedisSafetyCheck?: boolean; sourceOffset?: number; openInNewResultTab?: boolean }) {
|
||||
async function executeCurrentSql(sql: string, options?: { skipRedisSafetyCheck?: boolean; sourceOffset?: number; openInNewResultTab?: boolean; onExecutionStarted?: () => void }) {
|
||||
const executionTabId = activeTabId.value;
|
||||
if (!executionTabId) return;
|
||||
const tab = tabs.value.find((item) => item.id === executionTabId);
|
||||
@@ -3976,6 +3976,7 @@ export const useQueryStore = defineStore("query", () => {
|
||||
openInNewResultTab?: boolean;
|
||||
targetContext?: SqlExecutionTargetContext;
|
||||
executionTarget?: MultiDbExecutionTarget;
|
||||
onExecutionStarted?: () => void;
|
||||
},
|
||||
) {
|
||||
const tab = findExecutionTab(id);
|
||||
@@ -3993,6 +3994,7 @@ export const useQueryStore = defineStore("query", () => {
|
||||
const startedAt = performance.now();
|
||||
const elapsed = () => `${Math.round(performance.now() - startedAt)}ms`;
|
||||
tab.isExecuting = true;
|
||||
options?.onExecutionStarted?.();
|
||||
tab.isCancelling = false;
|
||||
if (!tab.queryExecutionStartedAt) {
|
||||
tab.queryExecutionStartedAt = Date.now();
|
||||
|
||||
Reference in new issue
Block a user