diff --git a/packages/builder/src/builderStore/dataBinding.js b/packages/builder/src/builderStore/dataBinding.js index 4d57311f5f..696d83932a 100644 --- a/packages/builder/src/builderStore/dataBinding.js +++ b/packages/builder/src/builderStore/dataBinding.js @@ -5,7 +5,7 @@ import { store } from "builderStore" import { tables as tablesStore, queries as queriesStores, -} from "stores/backend/" +} from "stores/backend" import { makePropSafe } from "@budibase/string-templates" import { TableNames } from "../constants" @@ -252,7 +252,7 @@ export const getSchemaForDatasource = (datasource, isForm = false) => { if (datasource) { const { type } = datasource if (type === "query") { - const queries = get(queriesStores).queries + const queries = get(queriesStores).list table = queries.find(query => query._id === datasource._id) } else { const tables = get(tablesStore).list diff --git a/packages/builder/src/pages/builder/[application]/data/datasource/[selectedDatasource]/index.svelte b/packages/builder/src/pages/builder/[application]/data/datasource/[selectedDatasource]/index.svelte index 76bab80067..d6203212fc 100644 --- a/packages/builder/src/pages/builder/[application]/data/datasource/[selectedDatasource]/index.svelte +++ b/packages/builder/src/pages/builder/[application]/data/datasource/[selectedDatasource]/index.svelte @@ -81,7 +81,7 @@
Queries - +
diff --git a/packages/builder/src/pages/builder/[application]/data/datasource/index.svelte b/packages/builder/src/pages/builder/[application]/data/datasource/index.svelte index 073aaeb68d..9bf0f1325c 100644 --- a/packages/builder/src/pages/builder/[application]/data/datasource/index.svelte +++ b/packages/builder/src/pages/builder/[application]/data/datasource/index.svelte @@ -4,12 +4,12 @@ import { onMount } from "svelte" onMount(async () => { - // navigate to first table in list, if not already selected + // navigate to first datasource in list, if not already selected $datasources.list.length > 0 && $goto(`../${$datasources.list[0]._id}`) }) -{#if $tables.list.length === 0} +{#if $datasources.list.length === 0} Connect your first datasource to start building. {:else} Select a datasource to edit