diff --git a/.changeset/spotty-ears-end.md b/.changeset/spotty-ears-end.md new file mode 100644 index 0000000000..3817cf2689 --- /dev/null +++ b/.changeset/spotty-ears-end.md @@ -0,0 +1,5 @@ +--- +"@medusajs/ui": patch +--- + +fix: fix onScroll in Select.Content diff --git a/packages/design-system/ui/src/components/select/select.tsx b/packages/design-system/ui/src/components/select/select.tsx index 918a97c528..5f7d39fbde 100644 --- a/packages/design-system/ui/src/components/select/select.tsx +++ b/packages/design-system/ui/src/components/select/select.tsx @@ -105,8 +105,8 @@ const Trigger = React.forwardRef< }) Trigger.displayName = "Select.Trigger" -interface SelectContentProps extends React.ComponentPropsWithoutRef { -} +interface SelectContentProps + extends React.ComponentPropsWithoutRef {} /** * The content that appears when the select is open. @@ -120,6 +120,7 @@ const Content = React.forwardRef< { className, children, + onScroll, /** * Whether to show the select items below (`popper`) or over (`item-aligned`) the select input. */ @@ -161,6 +162,7 @@ const Content = React.forwardRef< position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]" )} + onScroll={onScroll} > {children} @@ -201,7 +203,7 @@ const Item = React.forwardRef< (({ className, ...props }, ref) => ( ))