fix(dashboard): assign list keys based on index and id
which means: no more moving avatars whenever you re-sort the list 🎉
This commit is contained in:
parent
9ab6a5ba2e
commit
dac9281887
@ -157,7 +157,7 @@
|
|||||||
|
|
||||||
{#if settings && settings.accessibility ? (!settings.accessibility.expandedcards && !settings.accessibility.pagelinks) : true}
|
{#if settings && settings.accessibility ? (!settings.accessibility.expandedcards && !settings.accessibility.pagelinks) : true}
|
||||||
<Accordion class="my-3" stayOpen>
|
<Accordion class="my-3" stayOpen>
|
||||||
{#each slicedList as item, index (item.id)}
|
{#each slicedList as item, index (item.id + index)}
|
||||||
<AccordionItem>
|
<AccordionItem>
|
||||||
<CardsHeader {item} slot="header">
|
<CardsHeader {item} slot="header">
|
||||||
<div slot="icon">
|
<div slot="icon">
|
||||||
@ -181,7 +181,7 @@
|
|||||||
{/each}
|
{/each}
|
||||||
</Accordion>
|
</Accordion>
|
||||||
{:else if settings.accessibility.expandedcards}
|
{:else if settings.accessibility.expandedcards}
|
||||||
{#each slicedList as item, index (item.id)}
|
{#each slicedList as item, index (item.id + index)}
|
||||||
<Card class="mb-3">
|
<Card class="mb-3">
|
||||||
<CardHeader>
|
<CardHeader>
|
||||||
<CardsHeader {item}>
|
<CardsHeader {item}>
|
||||||
@ -209,7 +209,7 @@
|
|||||||
{/each}
|
{/each}
|
||||||
{:else}
|
{:else}
|
||||||
<div class="my-3">
|
<div class="my-3">
|
||||||
{#each slicedList as item, index (item.id)}
|
{#each slicedList as item, index (item.id + index)}
|
||||||
<Card>
|
<Card>
|
||||||
<Link class="accordion-button collapsed" style="text-decoration: none;" to={getItemLink(item)}>
|
<Link class="accordion-button collapsed" style="text-decoration: none;" to={getItemLink(item)}>
|
||||||
<CardsHeader {item}>
|
<CardsHeader {item}>
|
||||||
|
Loading…
Reference in New Issue
Block a user