Skip to content

Commit

Permalink
chore(topology): disable group node actions while checking (#1049)
Browse files Browse the repository at this point in the history
Signed-off-by: Thuan Vo <thvo@redhat.com>
  • Loading branch information
Thuan Vo authored Jun 6, 2023
1 parent d4cd1e9 commit 4ccacf7
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/app/Topology/Actions/NodeActions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,16 @@ export const ContextMenuItem: React.FC<ContextMenuItemProps> = ({
if (isDisabled) {
addSubscription(
elementSubj
.pipe(switchMap((element) => isDisabled(element, { services, notifications, history })))
.pipe(
switchMap((element) => {
setDisabled(true);
return isDisabled(element, { services, notifications, history });
})
)
.subscribe(setDisabled)
);
}
}, [addSubscription, elementSubj, isDisabled, services, notifications, history]);
}, [addSubscription, elementSubj, isDisabled, setDisabled, services, notifications, history]);

React.useEffect(() => {
elementSubj.next(element);
Expand Down

0 comments on commit 4ccacf7

Please sign in to comment.