mirror of
https://github.com/Fabio286/antares.git
synced 2025-06-05 21:59:22 +02:00
feat: open saved queries in a tab
This commit is contained in:
@ -345,6 +345,7 @@ watch(query, (val) => {
|
||||
schema: selectedSchema.value,
|
||||
content: val
|
||||
});
|
||||
|
||||
isQuerySaved.value = false;
|
||||
}, 200);
|
||||
});
|
||||
@ -368,6 +369,14 @@ watch(databaseSchemas, () => {
|
||||
selectedSchema.value = null;
|
||||
}, { deep: true });
|
||||
|
||||
watch(() => props.tab.content, () => {
|
||||
query.value = props.tab.content;
|
||||
const editorValue = queryEditor.value.editor.session.getValue();
|
||||
|
||||
if (editorValue !== query.value)// If change not rendered in editor
|
||||
queryEditor.value.editor.session.setValue(query.value);
|
||||
});
|
||||
|
||||
const runQuery = async (query: string) => {
|
||||
if (!query || isQuering.value) return;
|
||||
isQuering.value = true;
|
||||
|
Reference in New Issue
Block a user