fix: add allowScroll prop (#6215)
Signed-off-by: Udit Takkar <udit.07814802719@cse.mait.ac.in> Signed-off-by: Udit Takkar <udit.07814802719@cse.mait.ac.in> Co-authored-by: Peer Richelsen <peeroke@gmail.com>pull/6219/head
parent
3535a25a59
commit
518a4484d6
|
@ -182,7 +182,7 @@ const DateOverrideInputDialog = ({
|
||||||
return (
|
return (
|
||||||
<Dialog open={open} onOpenChange={setOpen}>
|
<Dialog open={open} onOpenChange={setOpen}>
|
||||||
<DialogTrigger asChild>{Trigger}</DialogTrigger>
|
<DialogTrigger asChild>{Trigger}</DialogTrigger>
|
||||||
<DialogContent size="md">
|
<DialogContent allowScroll={true} size="md">
|
||||||
<DateOverrideForm
|
<DateOverrideForm
|
||||||
excludedDates={excludedDates}
|
excludedDates={excludedDates}
|
||||||
{...passThroughProps}
|
{...passThroughProps}
|
||||||
|
|
|
@ -59,6 +59,7 @@ type DialogContentProps = React.ComponentProps<typeof DialogPrimitive["Content"]
|
||||||
closeText?: string;
|
closeText?: string;
|
||||||
actionDisabled?: boolean;
|
actionDisabled?: boolean;
|
||||||
Icon?: SVGComponent;
|
Icon?: SVGComponent;
|
||||||
|
allowScroll?: boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const DialogContent = React.forwardRef<HTMLDivElement, DialogContentProps>(
|
export const DialogContent = React.forwardRef<HTMLDivElement, DialogContentProps>(
|
||||||
|
@ -78,7 +79,8 @@ export const DialogContent = React.forwardRef<HTMLDivElement, DialogContentProps
|
||||||
: props.size == "md"
|
: props.size == "md"
|
||||||
? "p-8 sm:max-w-[48rem]"
|
? "p-8 sm:max-w-[48rem]"
|
||||||
: "p-8 sm:max-w-[35rem]",
|
: "p-8 sm:max-w-[35rem]",
|
||||||
"overflow-y-auto overscroll-auto md:h-auto md:max-h-[inherit]",
|
"max-h-[560px] overscroll-auto md:h-auto md:max-h-[inherit]",
|
||||||
|
props.allowScroll ? "overflow-y-auto" : "overflow-visible",
|
||||||
`${props.className || ""}`
|
`${props.className || ""}`
|
||||||
)}
|
)}
|
||||||
ref={forwardedRef}>
|
ref={forwardedRef}>
|
||||||
|
|
Loading…
Reference in New Issue