Always show navigation as selected when editing navigation settings

This commit is contained in:
Andrew Kingston 2022-05-19 21:04:14 +01:00
parent 0484a8a976
commit dbc4ab18d3
1 changed files with 12 additions and 4 deletions

View File

@ -24,6 +24,7 @@
let iframe let iframe
let layout let layout
let screen let screen
let selectedComponentId
let confirmDeleteDialog let confirmDeleteDialog
let idToDelete let idToDelete
let loading = true let loading = true
@ -63,10 +64,17 @@
} }
} }
// Don't show selected components unless on the components tab // Determine selected component ID
$: selectedComponentId = $isActive("./components") $: {
? $store.selectedComponentId if ($isActive("./components")) {
: "" selectedComponentId = $store.selectedComponentId
} else if ($isActive("./navigation")) {
selectedComponentId = "navigation"
} else {
selectedComponentId = null
}
}
$: previewData = { $: previewData = {
appId: $store.appId, appId: $store.appId,
layout, layout,