1
0
Fork 0
mirror of synced 2024-09-30 09:07:25 +13:00

Hide the selected component when dragging

This commit is contained in:
Andrew Kingston 2022-10-07 14:34:47 +01:00
parent cea2a4cecf
commit 4a0be4523b

View file

@ -48,14 +48,14 @@ const createScreenStore = () => {
}
// Insert DND placeholder if required
const { dndParent, dndIndex } = $builderStore
const { dndParent, dndIndex, selectedComponentId } = $builderStore
const insert = true
if (insert && activeScreen && dndParent && dndIndex != null) {
// let selectedComponent = findComponentById(
// activeScreen.props,
// selectedComponentId
// )
// delete selectedComponent._component
let selectedComponent = findComponentById(
activeScreen.props,
selectedComponentId
)
delete selectedComponent._component
const placeholder = {
_component: "placeholder",
_id: "placeholder",