move onSelect method ComponentsHierarchyChildren
This commit is contained in:
parent
09248d4d22
commit
59624741de
|
@ -49,7 +49,6 @@
|
|||
}
|
||||
|
||||
const changeScreen = screen => {
|
||||
console.log("Screen: ", screen)
|
||||
store.setCurrentScreen(screen.title)
|
||||
$goto(`./:page/${screen.title}`)
|
||||
}
|
||||
|
@ -82,7 +81,6 @@
|
|||
<ComponentsHierarchyChildren
|
||||
components={screen.component.props._children}
|
||||
currentComponent={$store.currentComponentInfo}
|
||||
onSelect={store.selectComponent}
|
||||
onDeleteComponent={confirmDeleteComponent}
|
||||
onMoveUpComponent={store.moveUpComponent}
|
||||
onMoveDownComponent={store.moveDownComponent}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<script>
|
||||
import { store } from "builderStore"
|
||||
import { last } from "lodash/fp"
|
||||
import { pipe } from "../common/core"
|
||||
import {
|
||||
|
@ -16,6 +17,7 @@
|
|||
export let onMoveUpComponent
|
||||
export let onMoveDownComponent
|
||||
export let onCopyComponent
|
||||
export let ids = []
|
||||
|
||||
const capitalise = s => s.substring(0, 1).toUpperCase() + s.substring(1)
|
||||
const get_name = s => (!s ? "" : last(s.split("/")))
|
||||
|
@ -28,11 +30,15 @@
|
|||
return onMoveDownComponent(c)
|
||||
}
|
||||
}
|
||||
|
||||
const selectComponent = (ids, component) => {
|
||||
store.selectComponent(component)
|
||||
}
|
||||
</script>
|
||||
|
||||
<ul>
|
||||
{#each components as component, index (component._id)}
|
||||
<li on:click|stopPropagation={() => onSelect(component)}>
|
||||
<li on:click|stopPropagation={() => selectComponent(ids, component)}>
|
||||
<div
|
||||
class="budibase__nav-item item"
|
||||
class:selected={currentComponent === component}
|
||||
|
|
|
@ -73,7 +73,6 @@
|
|||
<ComponentsHierarchyChildren
|
||||
components={_layout.component.props._children}
|
||||
currentComponent={$store.currentComponentInfo}
|
||||
onSelect={store.selectComponent}
|
||||
onDeleteComponent={confirmDeleteComponent}
|
||||
onMoveUpComponent={store.moveUpComponent}
|
||||
onMoveDownComponent={store.moveDownComponent}
|
||||
|
@ -103,8 +102,6 @@
|
|||
.pagelayoutSection {
|
||||
margin: 20px 0px 20px 0px;
|
||||
}
|
||||
.root {
|
||||
}
|
||||
.title {
|
||||
margin-left: 10px;
|
||||
font-size: 13px;
|
||||
|
|
Loading…
Reference in New Issue