mirror of
https://github.com/hcengineering/platform.git
synced 2024-11-26 04:23:58 +03: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()
|
||||
</script>
|
||||
|
||||
{#each categories as category, i}
|
||||
{#each categories as category, i (category)}
|
||||
{@const items = groupedDocs[category] ?? []}
|
||||
{#key category}
|
||||
<ListCategory
|
||||
{elementByIndex}
|
||||
{indexById}
|
||||
{extraHeaders}
|
||||
{space}
|
||||
{selectedObjectIds}
|
||||
{headerComponent}
|
||||
initIndex={getInitIndex(categories, i)}
|
||||
{baseMenuClass}
|
||||
{level}
|
||||
{viewOptions}
|
||||
{groupByKey}
|
||||
{lookup}
|
||||
{config}
|
||||
{docByIndex}
|
||||
{itemModels}
|
||||
{_class}
|
||||
singleCat={level === 0 && categories.length === 1}
|
||||
{category}
|
||||
{items}
|
||||
{newObjectProps}
|
||||
{createItemDialog}
|
||||
{createItemLabel}
|
||||
{loadingPropsLength}
|
||||
on:check
|
||||
on:uncheckAll
|
||||
on:row-focus
|
||||
on:dragstart={(e) => {
|
||||
dispatch('dragstart', {
|
||||
target: e.detail.target,
|
||||
index: e.detail.index + getInitIndex(categories, i)
|
||||
})
|
||||
}}
|
||||
{flatHeaders}
|
||||
{disableHeader}
|
||||
{props}
|
||||
{listDiv}
|
||||
bind:dragItem
|
||||
/>
|
||||
{/key}
|
||||
<ListCategory
|
||||
{elementByIndex}
|
||||
{indexById}
|
||||
{extraHeaders}
|
||||
{space}
|
||||
{selectedObjectIds}
|
||||
{headerComponent}
|
||||
initIndex={getInitIndex(categories, i)}
|
||||
{baseMenuClass}
|
||||
{level}
|
||||
{viewOptions}
|
||||
{groupByKey}
|
||||
{lookup}
|
||||
{config}
|
||||
{docByIndex}
|
||||
{itemModels}
|
||||
{_class}
|
||||
singleCat={level === 0 && categories.length === 1}
|
||||
{category}
|
||||
{items}
|
||||
{newObjectProps}
|
||||
{createItemDialog}
|
||||
{createItemLabel}
|
||||
{loadingPropsLength}
|
||||
on:check
|
||||
on:uncheckAll
|
||||
on:row-focus
|
||||
on:dragstart={(e) => {
|
||||
dispatch('dragstart', {
|
||||
target: e.detail.target,
|
||||
index: e.detail.index + getInitIndex(categories, i)
|
||||
})
|
||||
}}
|
||||
{flatHeaders}
|
||||
{disableHeader}
|
||||
{props}
|
||||
{listDiv}
|
||||
bind:dragItem
|
||||
/>
|
||||
{/each}
|
||||
|
Loading…
Reference in New Issue
Block a user