fix(editor): Fix for executions preview scroll load and wrong execution displayed (#4994)

* 🐛 Only add current workflow executions to to store when loading executions from global list
* 🐛 Fixing infinite scroll on executions list
* 🐛 Fixing global and current executions list sync
*  Resetting executions list when opening new workflow
* 🐛 Handling opening execution from global list before opening a workflow
*  Scrolling to active execution card if out of view, keeping selected execution after workflow load
This commit is contained in:
Milorad FIlipović
2022-12-22 12:40:33 +01:00
committed by GitHub
parent 75a974987d
commit bd0c2afaac
5 changed files with 45 additions and 8 deletions

View File

@@ -884,6 +884,9 @@ export default mixins(
},
async openWorkflow(workflowId: string) {
this.startLoading();
const selectedExecution = this.workflowsStore.activeWorkflowExecution;
this.resetWorkspace();
let data: IWorkflowDb | undefined;
try {
@@ -939,7 +942,12 @@ export default mixins(
}
this.canvasStore.zoomToFit();
this.$externalHooks().run('workflow.open', { workflowId, workflowName: data.name });
this.workflowsStore.activeWorkflowExecution = null;
if (selectedExecution?.workflowId !== workflowId) {
this.workflowsStore.activeWorkflowExecution = null;
this.workflowsStore.currentWorkflowExecutions = [];
} else {
this.workflowsStore.activeWorkflowExecution = selectedExecution;
}
this.stopLoading();
return data;
},