From 72752c2e116ca72c8ce8dca572014ad711529f1c Mon Sep 17 00:00:00 2001 From: vamsikrishnamathala Date: Wed, 10 Sep 2025 14:37:35 +0530 Subject: [PATCH] fix: members account type dropdown position --- packages/ui/src/dropdowns/custom-select.tsx | 66 +++++++++++---------- 1 file changed, 36 insertions(+), 30 deletions(-) diff --git a/packages/ui/src/dropdowns/custom-select.tsx b/packages/ui/src/dropdowns/custom-select.tsx index 0fe64dc357e..23485b3661e 100644 --- a/packages/ui/src/dropdowns/custom-select.tsx +++ b/packages/ui/src/dropdowns/custom-select.tsx @@ -1,6 +1,7 @@ -import { Listbox } from "@headlessui/react"; +import { Combobox } from "@headlessui/react"; import { Check, ChevronDown } from "lucide-react"; import React, { useRef, useState } from "react"; +import { createPortal } from "react-dom"; import { usePopper } from "react-popper"; // plane helpers import { useOutsideClickDetector } from "@plane/hooks"; @@ -54,7 +55,7 @@ const CustomSelect = (props: ICustomSelectProps) => { }; return ( - { > <> {customButton ? ( - + - + ) : ( - + - + )} - {isOpen && ( - closeDropdown()} static> -
- {children} -
-
- )} -
+ {isOpen && + createPortal( + +
+
+ {children} +
+
+
, + document.body + )} + ); }; const Option = (props: ICustomSelectItemProps) => { const { children, value, className } = props; return ( - cn( @@ -147,7 +153,7 @@ const Option = (props: ICustomSelectItemProps) => { {selected && } )} - + ); };