diff --git a/frontend/src2/query/Query.vue b/frontend/src2/query/Query.vue index 9bcb4d46..a878b4a3 100644 --- a/frontend/src2/query/Query.vue +++ b/frontend/src2/query/Query.vue @@ -1,5 +1,5 @@ diff --git a/frontend/src2/workbook/WorkbookQuery.vue b/frontend/src2/workbook/WorkbookQuery.vue index 20c169cd..d9b4f30e 100644 --- a/frontend/src2/workbook/WorkbookQuery.vue +++ b/frontend/src2/workbook/WorkbookQuery.vue @@ -9,12 +9,14 @@ const props = defineProps<{ name?: string; index: number | string }>() const workbook = inject(workbookKey) const activeQuery = computed(() => workbook?.doc.queries[Number(props.index)]) -const typeIsSet = computed( - () => +const typeIsSet = computed(() => { + return ( activeQuery.value?.is_native_query || activeQuery.value?.is_script_query || - activeQuery.value?.is_builder_query -) + activeQuery.value?.is_builder_query || + activeQuery.value?.operations.find((op) => op.type === 'source') + ) +}) function setQueryType(interfaceType: 'query-builder' | 'sql-editor' | 'script-editor') { if (!activeQuery.value) return