Skip to content

Commit

Permalink
fix(ui): avoid multiple drag and drop in ui - WF-148
Browse files Browse the repository at this point in the history
  • Loading branch information
madeindjs committed Dec 23, 2024
1 parent 0dddf0c commit 6819f65
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/ui/src/builder/BuilderApp.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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}`,
"{}",
Expand Down

0 comments on commit 6819f65

Please sign in to comment.