diff --git a/src/app/Topology/Actions/NodeActions.tsx b/src/app/Topology/Actions/NodeActions.tsx index 23e75e2ff..e22bbf0ad 100644 --- a/src/app/Topology/Actions/NodeActions.tsx +++ b/src/app/Topology/Actions/NodeActions.tsx @@ -98,11 +98,16 @@ export const ContextMenuItem: React.FC = ({ 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);