mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 10:31:15 +00:00
fix(editor): Fix Adding nodes one after the other also adds connections (no-changelog) (#11312)
Co-authored-by: Alex Grozav <alex@grozav.com>
This commit is contained in:
committed by
GitHub
parent
054fe9745f
commit
f67c0710e1
@@ -859,8 +859,12 @@ async function onAddNodesAndConnections(
|
||||
return;
|
||||
}
|
||||
|
||||
await addNodes(nodes, { dragAndDrop, position, trackHistory: true, telemetry: true });
|
||||
await nextTick();
|
||||
const addedNodes = await addNodes(nodes, {
|
||||
dragAndDrop,
|
||||
position,
|
||||
trackHistory: true,
|
||||
telemetry: true,
|
||||
});
|
||||
|
||||
const offsetIndex = editableWorkflow.value.nodes.length - nodes.length;
|
||||
const mappedConnections: CanvasConnectionCreateData[] = connections.map(({ from, to }) => {
|
||||
@@ -886,9 +890,8 @@ async function onAddNodesAndConnections(
|
||||
|
||||
addConnections(mappedConnections);
|
||||
|
||||
void nextTick(() => {
|
||||
uiStore.resetLastInteractedWith();
|
||||
});
|
||||
uiStore.resetLastInteractedWith();
|
||||
selectNodes([addedNodes[addedNodes.length - 1].id]);
|
||||
}
|
||||
|
||||
async function onRevertAddNode({ node }: { node: INodeUi }) {
|
||||
@@ -1565,6 +1568,7 @@ onBeforeUnmount(() => {
|
||||
<template>
|
||||
<WorkflowCanvas
|
||||
v-if="editableWorkflow && editableWorkflowObject && !isLoading"
|
||||
:id="editableWorkflow.id"
|
||||
:workflow="editableWorkflow"
|
||||
:workflow-object="editableWorkflowObject"
|
||||
:fallback-nodes="fallbackNodes"
|
||||
|
||||
Reference in New Issue
Block a user