From 7f574db37d912c6af7521bb9bdc99037ae4392ac Mon Sep 17 00:00:00 2001 From: Qxisylolo Date: Sat, 8 Feb 2025 11:19:23 +0800 Subject: [PATCH] the other actions are independent Signed-off-by: Qxisylolo --- public/components/ui_action_context_menu.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/public/components/ui_action_context_menu.tsx b/public/components/ui_action_context_menu.tsx index 9bd7ab2a..9d21bcc0 100644 --- a/public/components/ui_action_context_menu.tsx +++ b/public/components/ui_action_context_menu.tsx @@ -100,14 +100,14 @@ export const ActionContextMenu = (props: Props) => { ); // The action button should be not displayed when there is no action and result summary disabled or there is no data2Summary agent - if ((!resultSummaryEnabled && actionsRef.current.length === 0) || !isSummaryAgentAvailable) { + if ((!resultSummaryEnabled || !isSummaryAgentAvailable) && actionsRef.current.length === 0) { return null; } - // The action button should be disabled when context menu has no item and result summary disabled + // The action button should be disabled when context menu has no item or result summary disabled or or no data2Summary agent is available const actionDisabled = - ((panels.value?.[0]?.items ?? []).length === 0 && !resultSummaryEnabled) || - !isSummaryAgentAvailable; + (!resultSummaryEnabled || !isSummaryAgentAvailable) && + (panels.value?.[0]?.items ?? []).length === 0; return (