diff --git a/frontend/packages/ux-editor-v3/src/hooks/mutations/useDeleteFormContainerMutation.ts b/frontend/packages/ux-editor-v3/src/hooks/mutations/useDeleteFormContainerMutation.ts index 1e118f4f10a..b08ea7c280b 100644 --- a/frontend/packages/ux-editor-v3/src/hooks/mutations/useDeleteFormContainerMutation.ts +++ b/frontend/packages/ux-editor-v3/src/hooks/mutations/useDeleteFormContainerMutation.ts @@ -15,6 +15,7 @@ export const useDeleteFormContainerMutation = (org: string, app: string, layoutS // Todo: Consider if this should rather be done in the backend for (const componentId of layout.order[id]) { if (Object.keys(layout.components).indexOf(componentId) > -1) { + delete updatedLayout.components[componentId]; delete updatedLayout.containers[componentId]; delete updatedLayout.order[componentId]; updatedLayout.order[id].splice(updatedLayout.order[id].indexOf(componentId), 1); diff --git a/frontend/packages/ux-editor/src/hooks/mutations/useDeleteFormContainerMutation.ts b/frontend/packages/ux-editor/src/hooks/mutations/useDeleteFormContainerMutation.ts index 1e118f4f10a..b08ea7c280b 100644 --- a/frontend/packages/ux-editor/src/hooks/mutations/useDeleteFormContainerMutation.ts +++ b/frontend/packages/ux-editor/src/hooks/mutations/useDeleteFormContainerMutation.ts @@ -15,6 +15,7 @@ export const useDeleteFormContainerMutation = (org: string, app: string, layoutS // Todo: Consider if this should rather be done in the backend for (const componentId of layout.order[id]) { if (Object.keys(layout.components).indexOf(componentId) > -1) { + delete updatedLayout.components[componentId]; delete updatedLayout.containers[componentId]; delete updatedLayout.order[componentId]; updatedLayout.order[id].splice(updatedLayout.order[id].indexOf(componentId), 1);