From 6819f65f16922786b6d1c6aee901c40ed1cf629e Mon Sep 17 00:00:00 2001 From: Alexandre Rousseau Date: Mon, 23 Dec 2024 10:07:20 +0100 Subject: [PATCH] fix(ui): avoid multiple drag and drop in ui - WF-148 --- src/ui/src/builder/BuilderApp.vue | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/ui/src/builder/BuilderApp.vue b/src/ui/src/builder/BuilderApp.vue index 502d592a..e8069b4e 100644 --- a/src/ui/src/builder/BuilderApp.vue +++ b/src/ui/src/builder/BuilderApp.vue @@ -264,6 +264,12 @@ const handleRendererDragStart = (ev: DragEvent) => { const componentId = targetEl.dataset.writerId; const { type } = wf.getComponentById(componentId); + // we don't support yet dragginfg multiple components in UI. If drag is starting with multiple selections, we select only one component + if (ssbm.selectionStatus.value === SelectionStatus.Multiple) { + ssbm.setSelection(componentId, undefined, "click"); + ssbm.isSettingsBarCollapsed.value = true; + } + ev.dataTransfer.setData( `application/json;writer=${type},${componentId}`, "{}",