Skip to content

The open alternative to Salesforce, designed for AI.

Fix: pinned command-menu actions run with empty selection (#21366)

Raphaël Bosi7606dd75a8dd
diff --git a/packages/twenty-front/src/modules/ui/layout/page/components/PageCardHeader.tsx b/packages/twenty-front/src/modules/ui/layout/page/components/PageCardHeader.tsx
index 3b8711b4170..c7477a72bc0 100644
--- a/packages/twenty-front/src/modules/ui/layout/page/components/PageCardHeader.tsx
+++ b/packages/twenty-front/src/modules/ui/layout/page/components/PageCardHeader.tsx
@@ -4,6 +4,7 @@ import {
Breadcrumb,
type BreadcrumbProps,
} from '@/ui/navigation/bread-crumb/components/Breadcrumb';
+import { PAGE_ACTION_CONTAINER_CLICK_OUTSIDE_ID } from '@/ui/layout/page/constants/PageActionContainerClickOutsideId';
import { NavigationDrawerCollapseButton } from '@/ui/navigation/navigation-drawer/components/NavigationDrawerCollapseButton';
import { useIsMobile } from '@/ui/utilities/responsive/hooks/useIsMobile';
import { styled } from '@linaria/react';
@@ -88,7 +89,11 @@ export const PageCardHeader = ({
</StyledTitle>
)}
</StyledLeft>
- <StyledRight>{actionButton}</StyledRight>
+ <StyledRight
+ data-click-outside-id={PAGE_ACTION_CONTAINER_CLICK_OUTSIDE_ID}
+ >
+ {actionButton}
+ </StyledRight>
</StyledHeader>
);
};