small fixes
This commit is contained in:
parent
20a00d1225
commit
651b57fbb2
|
@ -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
|
||||
|
|
|
@ -81,7 +81,7 @@
|
|||
<Spacer extraLarge />
|
||||
<div class="query-header">
|
||||
<Heading small>Queries</Heading>
|
||||
<Button secondary on:click={() => $goto('../new')}>Add Query</Button>
|
||||
<Button secondary on:click={() => $goto('./new')}>Add Query</Button>
|
||||
</div>
|
||||
<Spacer extraLarge />
|
||||
<div class="query-list">
|
||||
|
|
|
@ -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}`)
|
||||
})
|
||||
</script>
|
||||
|
||||
{#if $tables.list.length === 0}
|
||||
{#if $datasources.list.length === 0}
|
||||
<i>Connect your first datasource to start building.</i>
|
||||
{:else}
|
||||
<i>Select a datasource to edit</i>
|
||||
|
|
Loading…
Reference in New Issue