mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-17 22:03:09 +00:00
List category collapse fix (#2626)
Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
parent
351e10817b
commit
32f1f80d5f
@ -122,47 +122,45 @@
|
|||||||
const dispatch = createEventDispatcher()
|
const dispatch = createEventDispatcher()
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{#each categories as category, i}
|
{#each categories as category, i (category)}
|
||||||
{@const items = groupedDocs[category] ?? []}
|
{@const items = groupedDocs[category] ?? []}
|
||||||
{#key category}
|
<ListCategory
|
||||||
<ListCategory
|
{elementByIndex}
|
||||||
{elementByIndex}
|
{indexById}
|
||||||
{indexById}
|
{extraHeaders}
|
||||||
{extraHeaders}
|
{space}
|
||||||
{space}
|
{selectedObjectIds}
|
||||||
{selectedObjectIds}
|
{headerComponent}
|
||||||
{headerComponent}
|
initIndex={getInitIndex(categories, i)}
|
||||||
initIndex={getInitIndex(categories, i)}
|
{baseMenuClass}
|
||||||
{baseMenuClass}
|
{level}
|
||||||
{level}
|
{viewOptions}
|
||||||
{viewOptions}
|
{groupByKey}
|
||||||
{groupByKey}
|
{lookup}
|
||||||
{lookup}
|
{config}
|
||||||
{config}
|
{docByIndex}
|
||||||
{docByIndex}
|
{itemModels}
|
||||||
{itemModels}
|
{_class}
|
||||||
{_class}
|
singleCat={level === 0 && categories.length === 1}
|
||||||
singleCat={level === 0 && categories.length === 1}
|
{category}
|
||||||
{category}
|
{items}
|
||||||
{items}
|
{newObjectProps}
|
||||||
{newObjectProps}
|
{createItemDialog}
|
||||||
{createItemDialog}
|
{createItemLabel}
|
||||||
{createItemLabel}
|
{loadingPropsLength}
|
||||||
{loadingPropsLength}
|
on:check
|
||||||
on:check
|
on:uncheckAll
|
||||||
on:uncheckAll
|
on:row-focus
|
||||||
on:row-focus
|
on:dragstart={(e) => {
|
||||||
on:dragstart={(e) => {
|
dispatch('dragstart', {
|
||||||
dispatch('dragstart', {
|
target: e.detail.target,
|
||||||
target: e.detail.target,
|
index: e.detail.index + getInitIndex(categories, i)
|
||||||
index: e.detail.index + getInitIndex(categories, i)
|
})
|
||||||
})
|
}}
|
||||||
}}
|
{flatHeaders}
|
||||||
{flatHeaders}
|
{disableHeader}
|
||||||
{disableHeader}
|
{props}
|
||||||
{props}
|
{listDiv}
|
||||||
{listDiv}
|
bind:dragItem
|
||||||
bind:dragItem
|
/>
|
||||||
/>
|
|
||||||
{/key}
|
|
||||||
{/each}
|
{/each}
|
||||||
|
Loading…
Reference in New Issue
Block a user