diff --git a/ui/desktop/src/components/ChatView.tsx b/ui/desktop/src/components/ChatView.tsx index 012d636c..7c1a089e 100644 --- a/ui/desktop/src/components/ChatView.tsx +++ b/ui/desktop/src/components/ChatView.tsx @@ -387,7 +387,8 @@ export default function ChatView({ activities={botConfig?.activities || null} /> ) : ( - + /* padding needs to be passed into the container inside ScrollArea to avoid pushing the scrollbar out */ + {filteredMessages.map((message, index) => (
diff --git a/ui/desktop/src/components/ui/scroll-area.tsx b/ui/desktop/src/components/ui/scroll-area.tsx index a994f8f3..0be52b56 100644 --- a/ui/desktop/src/components/ui/scroll-area.tsx +++ b/ui/desktop/src/components/ui/scroll-area.tsx @@ -12,10 +12,13 @@ export interface ScrollAreaHandle { interface ScrollAreaProps extends React.ComponentPropsWithoutRef { autoScroll?: boolean; + /* padding needs to be passed into the container inside ScrollArea to avoid pushing the scrollbar out */ + paddingX?: number; + paddingY?: number; } const ScrollArea = React.forwardRef( - ({ className, children, autoScroll = false, ...props }, ref) => { + ({ className, children, autoScroll = false, paddingX, paddingY, ...props }, ref) => { const rootRef = React.useRef>(null); const viewportRef = React.useRef(null); const viewportEndRef = React.useRef(null); @@ -104,8 +107,10 @@ const ScrollArea = React.forwardRef( ref={viewportRef} className="h-full w-full rounded-[inherit] [&>div]:!block" > - {children} - {autoScroll &&
} +
+ {children} + {autoScroll &&
} +