From af1c01fdd1d4fcd1f8bd4fb492d25aedeb6ee2fd Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Wed, 23 Mar 2022 10:17:52 +0000 Subject: [PATCH] Prevent collapsing datasource if only one datasource exists --- .../backend/DatasourceNavigator/DatasourceNavigator.svelte | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/builder/src/components/backend/DatasourceNavigator/DatasourceNavigator.svelte b/packages/builder/src/components/backend/DatasourceNavigator/DatasourceNavigator.svelte index 45ff66a901..453cdced51 100644 --- a/packages/builder/src/components/backend/DatasourceNavigator/DatasourceNavigator.svelte +++ b/packages/builder/src/components/backend/DatasourceNavigator/DatasourceNavigator.svelte @@ -22,10 +22,11 @@ const selected = $datasources.selected === datasource._id const open = openDataSources.includes(datasource._id) const containsSelected = containsActiveEntity(datasource) + const onlySource = $datasources.list.length === 1 return { ...datasource, selected, - open: selected || open || containsSelected, + open: selected || open || containsSelected || onlySource, } }) : []