Skip to content

Commit

Permalink
fix(ui): fix message card rendering issue (astronomer#172)
Browse files Browse the repository at this point in the history
How to fix and why the issue occurs:
https://svelte.dev/tutorial/keyed-each-blocks

closes: astronomer#83
  • Loading branch information
Lee-W authored Nov 24, 2023
1 parent 1067794 commit 515f338
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion ui/src/routes/requests/[request_id]/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@
return 0;
}) || [];
sortedMessages.reverse().forEach(function(item ,index){
item.id = index;
})
sortedMessages.reverse();
}
$: {
Expand Down Expand Up @@ -87,7 +92,7 @@
/>
{/if}

{#each sortedMessages as message}
{#each sortedMessages as message (message.id)}
<MessageCard {...message} />
{/each}

Expand Down

0 comments on commit 515f338

Please sign in to comment.