Skip to content

Commit

Permalink
Fix auto scroll behaviour (#90)
Browse files Browse the repository at this point in the history
  • Loading branch information
harishmohanraj authored Jan 11, 2024
1 parent 5d239ae commit 57b39aa
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/client/components/ConversationWrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,14 @@ export default function ConversationWrapper({

const scrollToBottom = () => {
if (conversationWindowRef.current) {
// @ts-ignore
conversationWindowRef.current.scrollTo({
setTimeout(() => {
// @ts-ignore
top: conversationWindowRef.current.scrollHeight,
behavior: "smooth",
});
conversationWindowRef.current.scrollTo({
// @ts-ignore
top: conversationWindowRef.current.scrollHeight,
behavior: "smooth",
});
}, 100);
}
};

Expand Down

0 comments on commit 57b39aa

Please sign in to comment.