From 32f1f80d5f982cf73206a95b7b7d03495604fa90 Mon Sep 17 00:00:00 2001 From: Denis Bykhov Date: Mon, 13 Feb 2023 15:36:24 +0600 Subject: [PATCH] List category collapse fix (#2626) Signed-off-by: Denis Bykhov --- .../src/components/list/ListCategories.svelte | 82 +++++++++---------- 1 file changed, 40 insertions(+), 42 deletions(-) diff --git a/plugins/view-resources/src/components/list/ListCategories.svelte b/plugins/view-resources/src/components/list/ListCategories.svelte index e140020bca..11abc4a660 100644 --- a/plugins/view-resources/src/components/list/ListCategories.svelte +++ b/plugins/view-resources/src/components/list/ListCategories.svelte @@ -122,47 +122,45 @@ const dispatch = createEventDispatcher() -{#each categories as category, i} +{#each categories as category, i (category)} {@const items = groupedDocs[category] ?? []} - {#key category} - { - dispatch('dragstart', { - target: e.detail.target, - index: e.detail.index + getInitIndex(categories, i) - }) - }} - {flatHeaders} - {disableHeader} - {props} - {listDiv} - bind:dragItem - /> - {/key} + { + dispatch('dragstart', { + target: e.detail.target, + index: e.detail.index + getInitIndex(categories, i) + }) + }} + {flatHeaders} + {disableHeader} + {props} + {listDiv} + bind:dragItem + /> {/each}