Skip to content

Scheduling infrastructure for absolutely everyone.

fix: react-select overflow issue in some modals. (#6587)

Nafees Nazik00cab5c41ff0
diff --git a/apps/web/components/dialog/EditLocationDialog.tsx b/apps/web/components/dialog/EditLocationDialog.tsx
index df7906127d3..87e946c801c 100644
--- a/apps/web/components/dialog/EditLocationDialog.tsx
+++ b/apps/web/components/dialog/EditLocationDialog.tsx
@@ -212,7 +212,7 @@ export const EditLocationDialog = (props: ISetLocationDialog) => {
return (
<Dialog open={isOpenDialog}>
- <DialogContent>
+ <DialogContent disableOverflow>
<div className="flex flex-row space-x-3">
<div className="bg-secondary-100 mx-auto flex h-12 w-12 flex-shrink-0 items-center justify-center rounded-full sm:mx-0 sm:h-10 sm:w-10">
<Icon.FiMapPin className="text-primary-600 h-6 w-6" />
diff --git a/packages/features/ee/teams/components/MemberChangeRoleModal.tsx b/packages/features/ee/teams/components/MemberChangeRoleModal.tsx
index 070512d8257..d3fa78013a4 100644
--- a/packages/features/ee/teams/components/MemberChangeRoleModal.tsx
+++ b/packages/features/ee/teams/components/MemberChangeRoleModal.tsx
@@ -67,7 +67,7 @@ export default function MemberChangeRoleModal(props: {
}
return (
<Dialog open={props.isOpen} onOpenChange={props.onExit}>
- <DialogContent type="creation">
+ <DialogContent disableOverflow type="creation">
<>
<div className="mb-4 sm:flex sm:items-start">
<div className="text-center sm:text-left">
diff --git a/packages/ui/components/dialog/Dialog.tsx b/packages/ui/components/dialog/Dialog.tsx
index d1fe17c6bd1..73cf22e667d 100644
--- a/packages/ui/components/dialog/Dialog.tsx
+++ b/packages/ui/components/dialog/Dialog.tsx
@@ -68,10 +68,11 @@ type DialogContentProps = React.ComponentProps<typeof DialogPrimitive["Content"]
closeText?: string;
actionDisabled?: boolean;
Icon?: SVGComponent;
+ disableOverflow?: boolean;
};
export const DialogContent = React.forwardRef<HTMLDivElement, DialogContentProps>(
- ({ children, title, Icon, type = "creation", ...props }, forwardedRef) => {
+ ({ children, title, Icon, disableOverflow, type = "creation", ...props }, forwardedRef) => {
return (
<DialogPrimitive.Portal>
<DialogPrimitive.Overlay className="fadeIn fixed inset-0 z-40 bg-gray-500 bg-opacity-75 transition-opacity" />
@@ -87,7 +88,8 @@ export const DialogContent = React.forwardRef<HTMLDivElement, DialogContentProps
: props.size == "md"
? "p-8 sm:max-w-[48rem]"
: "p-8 sm:max-w-[35rem]",
- "max-h-[95vh] overflow-auto",
+ "max-h-[95vh]",
+ disableOverflow ? "overflow-visible" : "overflow-auto",
`${props.className || ""}`
)}
ref={forwardedRef}>