From d063d4fa672ea98b1e6880a5482dde8d19a8d695 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Thu, 18 Aug 2022 12:58:43 +0100 Subject: [PATCH] Fixing issue with custom datasource section appearing when none exist. --- .../modals/CreateDatasourceModal.svelte | 27 +++++++++++-------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/packages/builder/src/components/backend/DatasourceNavigator/modals/CreateDatasourceModal.svelte b/packages/builder/src/components/backend/DatasourceNavigator/modals/CreateDatasourceModal.svelte index a500c6a5b3..8454f3b3d5 100644 --- a/packages/builder/src/components/backend/DatasourceNavigator/modals/CreateDatasourceModal.svelte +++ b/packages/builder/src/components/backend/DatasourceNavigator/modals/CreateDatasourceModal.svelte @@ -28,6 +28,9 @@ let importModal $: showImportButton = false + $: customIntegrations = Object.entries(integrations).filter( + entry => entry[1].custom + ) checkShowImport() @@ -163,17 +166,19 @@ /> {/each} - Custom data source -
- {#each Object.entries(integrations).filter(entry => entry[1].custom) as [integrationType, schema]} - selectIntegration(evt.detail)} - {schema} - bind:integrationType - {integration} - /> - {/each} -
+ {#if customIntegrations.length > 0} + Custom data source +
+ {#each customIntegrations as [integrationType, schema]} + selectIntegration(evt.detail)} + {schema} + bind:integrationType + {integration} + /> + {/each} +
+ {/if}