From efc974aba538846ed38f637c94aa0a77ed7388da Mon Sep 17 00:00:00 2001 From: navaneeth Date: Wed, 21 Apr 2021 12:07:22 +0530 Subject: [PATCH] BugFix for component size not being saved --- frontend/src/Editor/DraggableBox.jsx | 2 +- frontend/src/Editor/Editor.jsx | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) 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 + } } } })