From d2bc60cdc0ea784aadbadbe947035a1d0887f070 Mon Sep 17 00:00:00 2001 From: Johnson Cherian Date: Thu, 11 Jan 2024 02:14:01 +0530 Subject: [PATCH] fix: disable child widget selection when parents are selected --- frontend/src/Editor/DragContainer.jsx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/frontend/src/Editor/DragContainer.jsx b/frontend/src/Editor/DragContainer.jsx index c665eee642..b8b7bdb25d 100644 --- a/frontend/src/Editor/DragContainer.jsx +++ b/frontend/src/Editor/DragContainer.jsx @@ -276,8 +276,6 @@ export default function DragContainer({ : '.widget-target' ); - console.log('selectedComponents.length--- ', selectedComponents.length); - return (
@@ -693,7 +691,13 @@ export default function DragContainer({ mouseTest: true, dimensionViewable: selectedComponents.length > 2, }} - target={groupedTargets1.length ? groupedTargets1 : `.target-${i.parent}`} + target={ + groupedTargets.length + ? '.empty-widget' + : groupedTargets1.length + ? groupedTargets1 + : `.target-${i.parent}` + } draggable={true} resizable={{ edge: ['e', 'w', 'n', 's'],