From dbc4ab18d3c201fcc5aa23fb999f8da2bf541d7a Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Thu, 19 May 2022 21:04:14 +0100 Subject: [PATCH] Always show navigation as selected when editing navigation settings --- .../[screenId]/_components/AppPreview.svelte | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/packages/builder/src/pages/builder/app/[application]/design/[screenId]/_components/AppPreview.svelte b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/_components/AppPreview.svelte index b4dbf715a4..4178932866 100644 --- a/packages/builder/src/pages/builder/app/[application]/design/[screenId]/_components/AppPreview.svelte +++ b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/_components/AppPreview.svelte @@ -24,6 +24,7 @@ let iframe let layout let screen + let selectedComponentId let confirmDeleteDialog let idToDelete let loading = true @@ -63,10 +64,17 @@ } } - // Don't show selected components unless on the components tab - $: selectedComponentId = $isActive("./components") - ? $store.selectedComponentId - : "" + // Determine selected component ID + $: { + if ($isActive("./components")) { + selectedComponentId = $store.selectedComponentId + } else if ($isActive("./navigation")) { + selectedComponentId = "navigation" + } else { + selectedComponentId = null + } + } + $: previewData = { appId: $store.appId, layout,