From 239c328fe121e5a619cc48b4d1effee0f1c86dc3 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Mon, 21 Jun 2021 13:04:41 +0100 Subject: [PATCH] Fixing issues discovered by cypress tests. --- .../src/components/backend/DataTable/DataTable.svelte | 8 +++++--- .../backend/DataTable/ExternalDataSourceTable.svelte | 3 ++- .../backend/DataTable/RelationshipDataTable.svelte | 3 ++- .../builder/src/components/backend/DataTable/Table.svelte | 4 ++-- .../src/components/backend/DataTable/ViewDataTable.svelte | 2 ++ 5 files changed, 13 insertions(+), 7 deletions(-) diff --git a/packages/builder/src/components/backend/DataTable/DataTable.svelte b/packages/builder/src/components/backend/DataTable/DataTable.svelte index 6498976751..ea14104eea 100644 --- a/packages/builder/src/components/backend/DataTable/DataTable.svelte +++ b/packages/builder/src/components/backend/DataTable/DataTable.svelte @@ -17,13 +17,14 @@ let data = [] let loading = false $: isUsersTable = $tables.selected?._id === TableNames.USERS - $: title = $tables.selected.name - $: schema = $tables.selected.schema + $: title = $tables.selected?.name + $: schema = $tables.selected?.schema $: tableView = { schema, name: $views.selected?.name, } - $: isInternal = $tables.selected.type === "internal" + $: type = $tables.selected.type + $: isInternal = type === "internal" // Fetch rows for specified table $: { @@ -49,6 +50,7 @@ {schema} tableId={$tables.selected?._id} {data} + {type} allowEditing={true} bind:hideAutocolumns {loading} diff --git a/packages/builder/src/components/backend/DataTable/ExternalDataSourceTable.svelte b/packages/builder/src/components/backend/DataTable/ExternalDataSourceTable.svelte index 28915bd78a..53a71f2afe 100644 --- a/packages/builder/src/components/backend/DataTable/ExternalDataSourceTable.svelte +++ b/packages/builder/src/components/backend/DataTable/ExternalDataSourceTable.svelte @@ -6,12 +6,13 @@ let loading = false let error = false + let type = "external" {#if error}
{error}
{/if} - +