Skip to content

Commit

Permalink
remove history select blinking when task executed (mljar#126)
Browse files Browse the repository at this point in the history
  • Loading branch information
pplonski committed Jul 12, 2022
1 parent fdb9277 commit 0249a8d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 4 additions & 2 deletions frontend/src/tasks/tasksSlice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -211,11 +211,13 @@ export const getPDF =


export const fetchExecutionHistory =
(notebookId: Number) =>
(notebookId: Number, clearPreviousHistory = true) =>
async (dispatch: Dispatch<AnyAction>) => {

dispatch(setHistoricTask({} as ITask));
dispatch(clearExecutionHistory());
if(clearPreviousHistory) {
dispatch(clearExecutionHistory());
}

const sessionId = getSessionId();

Expand Down
3 changes: 1 addition & 2 deletions frontend/src/views/AppView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,7 @@ function App({ isSingleApp, notebookId, displayEmbed }: AppProps) {
if (waitForTask()) {
setTimeout(() => {
dispatch(fetchCurrentTask(notebookId));

dispatch(fetchExecutionHistory(notebookId));
dispatch(fetchExecutionHistory(notebookId, false));
}, 1000);
}
// eslint-disable-next-line react-hooks/exhaustive-deps
Expand Down

0 comments on commit 0249a8d

Please sign in to comment.