Element: #254 Chat history (display/virtual-list) What it shows: A windowed chat history of 40 messages that loads 30 older ones at the top without moving the view. When to use: Long conversations where older messages load on scroll and the scroll position must be preserved. Spec: - ` m.id} label="Conversation" height="18rem" {hasMore} loadingMore={loading} onloadmore={loadOlder}>` - `async function loadOlder()` prepends a page of 30 messages with `items = [...page, ...items];` - `` appends a new row Tags: virtual-list, history, chat, infinite, prepend Needs: @codeatlasdev/ui@4.6.0 Components: Button, Stack, VirtualList Live demo: https://ui.codeatlas.com.br/docs/display/virtual-list#chat-history m.id} label="Conversation" height="18rem" {hasMore} loadingMore={loading} onloadmore={loadOlder}> {#snippet item(m)}
{m.text}
{/snippet}