Fixed drawer not closing on task creation on Show Page (#3867)
Fixed close dropdown
This commit is contained in:
@ -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={
|
||||
<IconButton
|
||||
Icon={IconPlus}
|
||||
|
||||
@ -0,0 +1 @@
|
||||
export const SHOW_PAGE_ADD_BUTTON_DROPDOWN_ID = 'show-page-add-button-dropdown';
|
||||
Reference in New Issue
Block a user