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 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,