From 8b6875aa9909c5e93fe3621072152156c4491604 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Tue, 4 Jan 2022 14:46:10 +0000 Subject: [PATCH] Hiding all tables from data sources when there is no data for them (no placeholder table). --- .../PlusConfigForm.svelte | 42 +++++++++++-------- .../variables/ViewDynamicVariables.svelte | 2 +- 2 files changed, 26 insertions(+), 18 deletions(-) diff --git a/packages/builder/src/components/backend/DatasourceNavigator/TableIntegrationMenu/PlusConfigForm.svelte b/packages/builder/src/components/backend/DatasourceNavigator/TableIntegrationMenu/PlusConfigForm.svelte index f736d29bee..b97f23d7a3 100644 --- a/packages/builder/src/components/backend/DatasourceNavigator/TableIntegrationMenu/PlusConfigForm.svelte +++ b/packages/builder/src/components/backend/DatasourceNavigator/TableIntegrationMenu/PlusConfigForm.svelte @@ -175,15 +175,19 @@ onConfirm={datasources.removeSchemaError} /> {/if} - onClickTable(detail)} - schema={tableSchema} - data={Object.values(plusTables)} - allowEditColumns={false} - allowEditRows={false} - allowSelectRows={false} - customRenderers={[{ column: "primary", component: ArrayRenderer }]} -/> +{#if plusTables && Object.values(plusTables).length > 0} +
onClickTable(detail)} + schema={tableSchema} + data={Object.values(plusTables)} + allowEditColumns={false} + allowEditRows={false} + allowSelectRows={false} + customRenderers={[{ column: "primary", component: ArrayRenderer }]} + /> +{:else} + No tables found. +{/if} {#if plusTables?.length !== 0}
@@ -196,14 +200,18 @@ Tell budibase how your tables are related to get even more smart features. {/if} -
openRelationshipModal(detail.from, detail.to)} - schema={relationshipSchema} - data={relationshipInfo} - allowEditColumns={false} - allowEditRows={false} - allowSelectRows={false} -/> +{#if relationshipInfo && relationshipInfo.length > 0} +
openRelationshipModal(detail.from, detail.to)} + schema={relationshipSchema} + data={relationshipInfo} + allowEditColumns={false} + allowEditRows={false} + allowSelectRows={false} + /> +{:else} + No relationships configured. +{/if}