From 198a2a63f24e46728dfd98175d54b9c33b71ee6b Mon Sep 17 00:00:00 2001 From: Aaryan Khandelwal <65252264+aaryan610@users.noreply.github.com> Date: Mon, 13 May 2024 12:06:34 +0530 Subject: [PATCH 1/5] [WEB-1271] fix: show only joined projects in the filters list (#4417) --- .../issues/issue-layouts/filters/header/filters/project.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/components/issues/issue-layouts/filters/header/filters/project.tsx b/web/components/issues/issue-layouts/filters/header/filters/project.tsx index b3924cd34..26b0bb46b 100644 --- a/web/components/issues/issue-layouts/filters/header/filters/project.tsx +++ b/web/components/issues/issue-layouts/filters/header/filters/project.tsx @@ -23,9 +23,9 @@ export const FilterProjects: React.FC = observer((props) => { const [itemsToRender, setItemsToRender] = useState(5); const [previewEnabled, setPreviewEnabled] = useState(true); // store - const { getProjectById, workspaceProjectIds } = useProject(); + const { getProjectById, joinedProjectIds } = useProject(); // derived values - const projects = workspaceProjectIds?.map((projectId) => getProjectById(projectId)!) ?? null; + const projects = joinedProjectIds?.map((projectId) => getProjectById(projectId)!) ?? null; const appliedFiltersCount = appliedFilters?.length ?? 0; const sortedOptions = useMemo(() => { From 18ba4009e0c4f965d09304c01fc0ef72a2e644b6 Mon Sep 17 00:00:00 2001 From: Satish Gandham Date: Mon, 13 May 2024 13:05:10 +0530 Subject: [PATCH 2/5] - Stop the default behavior on the custom menu button. (#4440) - Refactor menu click handler function --- packages/ui/src/dropdowns/custom-menu.tsx | 27 +++++++++-------------- 1 file changed, 10 insertions(+), 17 deletions(-) diff --git a/packages/ui/src/dropdowns/custom-menu.tsx b/packages/ui/src/dropdowns/custom-menu.tsx index 549c83fe7..316cc6960 100644 --- a/packages/ui/src/dropdowns/custom-menu.tsx +++ b/packages/ui/src/dropdowns/custom-menu.tsx @@ -68,6 +68,13 @@ const CustomMenu = (props: ICustomMenuDropdownProps) => { if (closeOnSelect) closeDropdown(); }; + const handleMenuButtonClick = (e:React.MouseEvent)=>{ + e.stopPropagation(); + e.preventDefault() + isOpen ? closeDropdown() : openDropdown(); + if (menuButtonOnClick) menuButtonOnClick(); + } + useOutsideClickDetector(dropdownRef, closeDropdown); let menuItems = ( @@ -112,11 +119,7 @@ const CustomMenu = (props: ICustomMenuDropdownProps) => {