The open alternative to Salesforce, designed for AI.
TypeScript crmcrm-systemcustomergood-first-issuegraphqlhacktoberfestjavascriptmarketingmonoreponestjsopen-sourcepostgresqlreactreactjssalestypescriptweb
Fixed drawer not closing on task creation on Show Page (#3867)
Lucas Bordeaue2db6a994dde
diff --git a/packages/twenty-front/src/modules/ui/layout/show-page/components/ShowPageAddButton.tsx b/packages/twenty-front/src/modules/ui/layout/show-page/components/ShowPageAddButton.tsxindex 3355f6f0f70..b0b3daa7ef6 100644--- a/packages/twenty-front/src/modules/ui/layout/show-page/components/ShowPageAddButton.tsx+++ b/packages/twenty-front/src/modules/ui/layout/show-page/components/ShowPageAddButton.tsx@@ -8,6 +8,7 @@ import { IconCheckbox, IconNotes, IconPlus } from '@/ui/display/icon/index';import { IconButton } from '@/ui/input/button/components/IconButton';import { DropdownMenuItemsContainer } from '@/ui/layout/dropdown/components/DropdownMenuItemsContainer';import { useDropdown } from '@/ui/layout/dropdown/hooks/useDropdown';+import { SHOW_PAGE_ADD_BUTTON_DROPDOWN_ID } from '@/ui/layout/show-page/constants/ShowPageAddButtonDropdownId';import { MenuItem } from '@/ui/navigation/menu-item/components/MenuItem';import { Dropdown } from '../../dropdown/components/Dropdown';@@ -22,7 +23,9 @@ export const ShowPageAddButton = ({}: {entity: ActivityTargetableObject;}) => {- const { closeDropdown, toggleDropdown } = useDropdown('add-show-page');+ const { closeDropdown, toggleDropdown } = useDropdown(+ SHOW_PAGE_ADD_BUTTON_DROPDOWN_ID,+ );const openCreateActivity = useOpenCreateActivityDrawer();const handleSelect = (type: ActivityType) => {@@ -33,7 +36,7 @@ export const ShowPageAddButton = ({return (<StyledContainer><Dropdown- dropdownId="show-page-add-button-dropdown-id"+ dropdownId={SHOW_PAGE_ADD_BUTTON_DROPDOWN_ID}clickableComponent={<IconButtonIcon={IconPlus}diff --git a/packages/twenty-front/src/modules/ui/layout/show-page/constants/ShowPageAddButtonDropdownId.ts b/packages/twenty-front/src/modules/ui/layout/show-page/constants/ShowPageAddButtonDropdownId.tsnew file mode 100644index 00000000000..833d71422b2--- /dev/null+++ b/packages/twenty-front/src/modules/ui/layout/show-page/constants/ShowPageAddButtonDropdownId.ts@@ -0,0 +1 @@+export const SHOW_PAGE_ADD_BUTTON_DROPDOWN_ID = 'show-page-add-button-dropdown';