Prevent workflow right drawer flickering when selecting an action type (#8028)
In this PR: - Use a stable id for create-step nodes; it makes it possible to preserve their selected attribute and keep them open even after the flow is re-generated - Preemptively open the WorkflowStepEdit right drawer for the created action https://github.com/user-attachments/assets/c19e6820-e198-4d06-98ae-898bd6e53e33 Fixes https://github.com/twentyhq/private-issues/issues/123
This commit is contained in:
committed by
GitHub
parent
315820ec86
commit
e44d525e83
@ -27,7 +27,9 @@ export const WorkflowDiagramEffect = ({
|
||||
workflowDiagramState,
|
||||
);
|
||||
|
||||
const nextWorkflowDiagram = getWorkflowVersionDiagram(currentVersion);
|
||||
const nextWorkflowDiagram = addCreateStepNodes(
|
||||
getWorkflowVersionDiagram(currentVersion),
|
||||
);
|
||||
|
||||
let mergedWorkflowDiagram = nextWorkflowDiagram;
|
||||
if (isDefined(previousWorkflowDiagram)) {
|
||||
@ -37,11 +39,7 @@ export const WorkflowDiagramEffect = ({
|
||||
);
|
||||
}
|
||||
|
||||
const workflowDiagramWithCreateStepNodes = addCreateStepNodes(
|
||||
mergedWorkflowDiagram,
|
||||
);
|
||||
|
||||
set(workflowDiagramState, workflowDiagramWithCreateStepNodes);
|
||||
set(workflowDiagramState, mergedWorkflowDiagram);
|
||||
};
|
||||
},
|
||||
[],
|
||||
|
||||
Reference in New Issue
Block a user