Skip to content

Commit

Permalink
feat(front): autoscroll at bottom on ssr
Browse files Browse the repository at this point in the history
use a reverse column flexbox so that the default scroll position is at the bottom
  • Loading branch information
nsarrazin committed Mar 2, 2025
1 parent e707952 commit 64911e1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/components/chat/ChatWindow.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -275,8 +275,8 @@
{/if}

{#if messages.length > 0}
<div class="flex h-max flex-col gap-8 pb-52">
{#each messages as message, idx (message.id)}
<div class="flex h-max flex-col-reverse gap-8 pb-52">
{#each messages.toReversed() as message, idx (message.id)}
<ChatMessage
{loading}
{message}
Expand Down

0 comments on commit 64911e1

Please sign in to comment.