From 80edd63a788a817513f9d4b2aba51e38cda9c805 Mon Sep 17 00:00:00 2001 From: james-union <105876962+james-union@users.noreply.github.com> Date: Tue, 14 Mar 2023 23:02:00 -0400 Subject: [PATCH] The rendering of node status in a dynamic workflow is not functioning correctly (#723) fix: dynamic nodes status Signed-off-by: James --- .../Executions/ExecutionDetails/ExecutionNodeViews.tsx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/console/src/components/Executions/ExecutionDetails/ExecutionNodeViews.tsx b/packages/console/src/components/Executions/ExecutionDetails/ExecutionNodeViews.tsx index e88e90e2b..dc09b04d6 100644 --- a/packages/console/src/components/Executions/ExecutionDetails/ExecutionNodeViews.tsx +++ b/packages/console/src/components/Executions/ExecutionDetails/ExecutionNodeViews.tsx @@ -6,7 +6,7 @@ import { DataError } from 'components/Errors/DataError'; import { useTabState } from 'components/hooks/useTabState'; import { secondaryBackgroundColor } from 'components/Theme/constants'; import { Execution } from 'models/Execution/types'; -import { keyBy } from 'lodash'; +import { clone, keyBy, merge } from 'lodash'; import { LargeLoadingSpinner } from 'components/common/LoadingSpinner'; import { FilterOperation } from 'models/AdminEntity/types'; import { NodeExecutionDetailsContextProvider } from '../contextProvider/NodeExecutionDetails'; @@ -77,7 +77,12 @@ export const ExecutionNodeViews: React.FC = ({ nodeExecutionsQuery.data, 'scopedId', ); - setCurrentNodeExecutionsById(currentNodeExecutionsById); + const prevNodeExecutionsById = clone(nodeExecutionsById); + const newNodeExecutionsById = merge( + prevNodeExecutionsById, + currentNodeExecutionsById, + ); + setCurrentNodeExecutionsById(newNodeExecutionsById); }, [nodeExecutionsQuery.data]); const LoadingComponent = () => {