bugfix: not selecting component after add
This commit is contained in:
parent
cd9f539a09
commit
46da102670
|
@ -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>
|
||||
|
||||
|
|
|
@ -20,7 +20,8 @@
|
|||
},
|
||||
]
|
||||
|
||||
store.setCurrentPage($params.page ? $params.page : "main")
|
||||
if (!$store.currentPageName)
|
||||
store.setCurrentPage($params.page ? $params.page : "main")
|
||||
|
||||
const changePage = id => {
|
||||
store.setCurrentPage(id)
|
||||
|
|
|
@ -55,7 +55,8 @@
|
|||
<FrontendNavigatePane />
|
||||
</div>
|
||||
<div slot="1">
|
||||
<ComponentSelectionList toggleTab={leftNavSwitcher.selectTab} /> </div>
|
||||
<ComponentSelectionList toggleTab={leftNavSwitcher.selectTab} />
|
||||
</div>
|
||||
</Switcher>
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue