bugfix: not selecting component after add
This commit is contained in:
parent
cd9f539a09
commit
46da102670
|
@ -1,4 +1,5 @@
|
||||||
<script>
|
<script>
|
||||||
|
import { goto } from "@sveltech/routify"
|
||||||
import { splitName } from "./pagesParsing/splitRootComponentName.js"
|
import { splitName } from "./pagesParsing/splitRootComponentName.js"
|
||||||
import components from "./temporaryPanelStructure.js"
|
import components from "./temporaryPanelStructure.js"
|
||||||
import ConfirmDialog from "components/common/ConfirmDialog.svelte"
|
import ConfirmDialog from "components/common/ConfirmDialog.svelte"
|
||||||
|
@ -32,7 +33,15 @@
|
||||||
|
|
||||||
const onComponentChosen = component => {
|
const onComponentChosen = component => {
|
||||||
store.addChildComponent(component._component)
|
store.addChildComponent(component._component)
|
||||||
|
|
||||||
toggleTab("Navigate")
|
toggleTab("Navigate")
|
||||||
|
|
||||||
|
// Get ID path
|
||||||
|
const path = store.getPathToComponent($store.currentComponentInfo)
|
||||||
|
|
||||||
|
// Go to correct URL
|
||||||
|
$goto(`./:page/:screen/${path}`)
|
||||||
|
|
||||||
}
|
}
|
||||||
</script>
|
</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 => {
|
const changePage = id => {
|
||||||
store.setCurrentPage(id)
|
store.setCurrentPage(id)
|
||||||
|
|
|
@ -55,7 +55,8 @@
|
||||||
<FrontendNavigatePane />
|
<FrontendNavigatePane />
|
||||||
</div>
|
</div>
|
||||||
<div slot="1">
|
<div slot="1">
|
||||||
<ComponentSelectionList toggleTab={leftNavSwitcher.selectTab} /> </div>
|
<ComponentSelectionList toggleTab={leftNavSwitcher.selectTab} />
|
||||||
|
</div>
|
||||||
</Switcher>
|
</Switcher>
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue