bugfix: not selecting component after add

This commit is contained in:
Michael Shanks 2020-05-29 14:56:21 +01:00
parent cd9f539a09
commit 46da102670
3 changed files with 13 additions and 2 deletions

View File

@ -1,4 +1,5 @@
<script>
import { goto } from "@sveltech/routify"
import { splitName } from "./pagesParsing/splitRootComponentName.js"
import components from "./temporaryPanelStructure.js"
import ConfirmDialog from "components/common/ConfirmDialog.svelte"
@ -32,7 +33,15 @@
const onComponentChosen = component => {
store.addChildComponent(component._component)
toggleTab("Navigate")
// Get ID path
const path = store.getPathToComponent($store.currentComponentInfo)
// Go to correct URL
$goto(`./:page/:screen/${path}`)
}
</script>

View File

@ -20,6 +20,7 @@
},
]
if (!$store.currentPageName)
store.setCurrentPage($params.page ? $params.page : "main")
const changePage = id => {

View File

@ -55,7 +55,8 @@
<FrontendNavigatePane />
</div>
<div slot="1">
<ComponentSelectionList toggleTab={leftNavSwitcher.selectTab} /> </div>
<ComponentSelectionList toggleTab={leftNavSwitcher.selectTab} />
</div>
</Switcher>