From 4fe2ef706b4cc268683287cc14aea723ee56d581 Mon Sep 17 00:00:00 2001
From: Vamsi Krishna <46787868+vamsikrishnamathala@users.noreply.github.com>
Date: Thu, 11 Sep 2025 14:20:10 +0530
Subject: [PATCH] [WEB-4441]fix: members account type dropdown position #7759
---
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 0fe64dc35..23485b366 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(
+
+
+ ,
+ document.body
+ )}
+
);
};
const Option = (props: ICustomSelectItemProps) => {
const { children, value, className } = props;
return (
-
cn(
@@ -147,7 +153,7 @@ const Option = (props: ICustomSelectItemProps) => {
{selected && }
>
)}
-
+
);
};