Skip to content

Commit

Permalink
fix: block pipeline load post update (#1333)
Browse files Browse the repository at this point in the history
Signed-off-by: bbehnke <bradleybehnke@yahoo.com>
(cherry picked from commit c24b91c)
  • Loading branch information
bbehnke authored and whynowy committed Nov 3, 2023
1 parent 2307660 commit 52d9370
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,15 @@ export function PipelineUpdate({
pipelineId: updatedPipelineId,
active: !!updatedPipelineId,
});

// Call update complete on dismount if pipeline was updated
useEffect(() => {
return () => {
if (updatedPipelineId) {
onUpdateComplete && onUpdateComplete();
}
};
}, [updatedPipelineId, onUpdateComplete]);

// Track update process and close on completion
useEffect(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ export function PipelineCard({

const handleUpdateComplete = useCallback(() => {
refresh();
setPipelineAbleToLoad(false);
if (!setSidebarProps) {
return;
}
Expand Down

0 comments on commit 52d9370

Please sign in to comment.