Skip to content

Commit

Permalink
the other actions are independent
Browse files Browse the repository at this point in the history
Signed-off-by: Qxisylolo <[email protected]>
  • Loading branch information
Qxisylolo committed Feb 20, 2025
1 parent e6ef570 commit 7f574db
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions public/components/ui_action_context_menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
<EuiPopover
Expand Down

0 comments on commit 7f574db

Please sign in to comment.