mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-20 13:32:00 +00:00
feat(FE): add onScroll prop to SelectPrimitive.Viewport
This commit is contained in:
@@ -55,7 +55,11 @@ function SelectContent({
|
||||
children,
|
||||
position = 'popper',
|
||||
...props
|
||||
}: React.ComponentProps<typeof SelectPrimitive.Content>) {
|
||||
}: React.ComponentProps<typeof SelectPrimitive.Content> & {
|
||||
onScroll?: React.UIEventHandler<HTMLDivElement>;
|
||||
}) {
|
||||
const { onScroll, ...restProps } = props;
|
||||
|
||||
return (
|
||||
<SelectPrimitive.Portal>
|
||||
<SelectPrimitive.Content
|
||||
@@ -67,7 +71,7 @@ function SelectContent({
|
||||
className
|
||||
)}
|
||||
position={position}
|
||||
{...props}
|
||||
{...restProps}
|
||||
>
|
||||
<SelectScrollUpButton />
|
||||
<SelectPrimitive.Viewport
|
||||
@@ -76,6 +80,7 @@ function SelectContent({
|
||||
position === 'popper' &&
|
||||
'h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1'
|
||||
)}
|
||||
onScroll={onScroll}
|
||||
>
|
||||
{children}
|
||||
</SelectPrimitive.Viewport>
|
||||
|
||||
Reference in New Issue
Block a user