From 651b57fbb281f3ebc34664a4be4a2246403c20d6 Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Tue, 13 Apr 2021 09:20:30 +0100 Subject: [PATCH] small fixes --- packages/builder/src/builderStore/dataBinding.js | 4 ++-- .../data/datasource/[selectedDatasource]/index.svelte | 2 +- .../pages/builder/[application]/data/datasource/index.svelte | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) 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