Skip to content

Commit 05a2111

Browse files
Can edit conditional node
1 parent f679d82 commit 05a2111

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

formbuilder/FormBuilder/Components/Workflow/WorkflowEditor.razor

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -442,14 +442,23 @@
442442
private void UpdateLink(WorkflowStep newStep, NodeModel sourceNodeModel, WorkflowLink sourceLink = null)
443443
{
444444
var sourceWorkflowStepNode = sourceNodeModel as WorkflowStepNode;
445-
if (sourceWorkflowStepNode != null && sourceLink != null)
445+
var conditionNode = sourceNodeModel as WorkflowConditionNode;
446+
if (sourceLink != null)
446447
{
447448
var link = Context.Definition.Workflow.Links.SingleOrDefault(l => l.Id == sourceLink.Id);
448449
if(link != null)
449450
{
450-
link.Targets.First().TargetStepId = newStep.Id;
451+
if(sourceWorkflowStepNode != null)
452+
{
453+
link.Targets.First().TargetStepId = newStep.Id;
454+
}
455+
else if(conditionNode != null)
456+
{
457+
link.Targets.Last().TargetStepId = newStep.Id;
458+
}
451459
}
452460
}
461+
453462
}
454463

455464
private void RefreshAvailableLayouts()

0 commit comments

Comments
 (0)