diff --git a/src/components/ui/scroll-area/ScrollArea.tsx b/src/components/ui/scroll-area/ScrollArea.tsx index 29da5e979c..15d1dd7789 100644 --- a/src/components/ui/scroll-area/ScrollArea.tsx +++ b/src/components/ui/scroll-area/ScrollArea.tsx @@ -61,24 +61,12 @@ Scrollbar.displayName = 'ScrollArea.Scrollbar' export const Viewport = React.forwardRef< React.ElementRef, - React.ComponentPropsWithoutRef & { - onScrollToBottom?: () => void - } ->(({ className, onScrollToBottom, onScroll, ...rest }, forwardedRef) => ( + React.ComponentPropsWithoutRef +>(({ className, ...rest }, forwardedRef) => ( { - const { clientHeight, scrollHeight, scrollTop } = event.target as Element - - if (scrollHeight - scrollTop === clientHeight) { - onScrollToBottom?.() - } - - onScroll?.(event) - }} /> )) Viewport.displayName = 'ScrollArea.Viewport'