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

@@ -935,7 +935,7 @@ export const useWorkflowsStore = defineStore(STORES.WORKFLOWS, {
requestFilter,
);
}
// context.commit('setTotalFinishedExecutionsCount', finishedExecutions.count);
this.finishedExecutionsCount = finishedExecutions.count;
return [...activeExecutions, ...(finishedExecutions.results || [])];
} catch (error) {
throw error;
@@ -947,7 +947,7 @@ export const useWorkflowsStore = defineStore(STORES.WORKFLOWS, {
addToCurrentExecutions(executions: IExecutionsSummary[]): void {
executions.forEach(execution => {
const exists = this.currentWorkflowExecutions.find(ex => ex.id === execution.id);
if (!exists) {
if (!exists && execution.workflowId === this.workflowId) {
this.currentWorkflowExecutions.push(execution);
}
});