diff --git a/frontend/src/Editor/DraggableBox.jsx b/frontend/src/Editor/DraggableBox.jsx index bc91276a8c..34d816ef45 100644 --- a/frontend/src/Editor/DraggableBox.jsx +++ b/frontend/src/Editor/DraggableBox.jsx @@ -78,7 +78,7 @@ export const DraggableBox = function DraggableBox({ id, title, left, top, width, onResizeStop(id, width, height, e, direction, ref, d); }} > -
+
{ console.log('new component definition', newDefinition); console.log('app definition', this.state.appDefinition); - debugger this.setState( { appDefinition: { ...this.state.appDefinition, components: { ...this.state.appDefinition.components, - [newDefinition.id]: { component: newDefinition.component } + [newDefinition.id]: { + ...this.state.appDefinition.components[newDefinition.id], + component: newDefinition.component + } } } })