Skip to content

Commit e3be90e

Browse files
committed
deleted cd in env when again selected shows used
1 parent e1c06dc commit e3be90e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/components/workflowEditor/workflowEditor.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,11 +111,10 @@ class WorkflowEdit extends Component<WorkflowEditProps, WorkflowEditState> {
111111
const allCINodeMap = new Map()
112112
const allDeploymentNodeMap = new Map()
113113
let isDeletionInProgress
114+
const _envIds = []
114115
for (const workFlow of result.workflows) {
115116
for (const node of workFlow.nodes) {
116-
this.setState({
117-
envIds: [...this.state.envIds, node.environmentId]
118-
})
117+
_envIds.push(node.environmentId)
119118
if (node.type === WorkflowNodeType.CI) {
120119
allCINodeMap.set(node.id, node)
121120
} else if (node.type === WorkflowNodeType.CD) {
@@ -142,7 +141,8 @@ class WorkflowEdit extends Component<WorkflowEditProps, WorkflowEditState> {
142141
allDeploymentNodeMap: allDeploymentNodeMap,
143142
view: ViewType.FORM,
144143
envToShowWebhookTippy: -1,
145-
filteredCIPipelines: result.filteredCIPipelines
144+
filteredCIPipelines: result.filteredCIPipelines,
145+
envIds: _envIds
146146
})
147147
})
148148
.catch((errors) => {

0 commit comments

Comments
 (0)