diff --git a/packages/builder/src/builderStore/store/backend/queries.js b/packages/builder/src/builderStore/store/backend/queries.js index 68851f59ee..9e4490a7f0 100644 --- a/packages/builder/src/builderStore/store/backend/queries.js +++ b/packages/builder/src/builderStore/store/backend/queries.js @@ -49,6 +49,7 @@ function createQueriesStore() { return json }, select: query => { + update(state => ({ ...state, selected: query._id })) datasources.update(state => ({ ...state, selected: query.datasourceId })) }, delete: async query => { diff --git a/packages/builder/src/components/backend/DatasourceNavigator/DatasourceNavigator.svelte b/packages/builder/src/components/backend/DatasourceNavigator/DatasourceNavigator.svelte index f101bee181..a0e5c783b9 100644 --- a/packages/builder/src/components/backend/DatasourceNavigator/DatasourceNavigator.svelte +++ b/packages/builder/src/components/backend/DatasourceNavigator/DatasourceNavigator.svelte @@ -24,6 +24,8 @@ datasources.fetch() queries.fetch() }) + + $: console.log($queries) {#if $database?._id} diff --git a/packages/builder/src/pages/[application]/data/datasource/[selectedDatasource]/[query]/index.svelte b/packages/builder/src/pages/[application]/data/datasource/[selectedDatasource]/[query]/index.svelte index 62332f405d..8fc21249b7 100644 --- a/packages/builder/src/pages/[application]/data/datasource/[selectedDatasource]/[query]/index.svelte +++ b/packages/builder/src/pages/[application]/data/datasource/[selectedDatasource]/[query]/index.svelte @@ -1,7 +1,6 @@