mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-14 20:39:03 +00:00
Fix Navigator spaces display in case of multiple contributions (#1097)
Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
parent
748ad4d258
commit
35b8fbe9c5
@ -16,7 +16,7 @@
|
||||
<script lang="ts">
|
||||
import core, { Ref, SortingOrder, Space } from '@anticrm/core'
|
||||
import { getResource } from '@anticrm/platform'
|
||||
import { createQuery } from '@anticrm/presentation'
|
||||
import { createQuery, getClient } from '@anticrm/presentation'
|
||||
import { Scroller } from '@anticrm/ui'
|
||||
import type { NavigatorModel, SpecialNavModel } from '@anticrm/workbench'
|
||||
import { createEventDispatcher } from 'svelte'
|
||||
@ -29,6 +29,8 @@
|
||||
export let currentSpace: Ref<Space> | undefined
|
||||
export let currentSpecial: string | undefined
|
||||
|
||||
const client = getClient()
|
||||
const hierarchy = client.getHierarchy()
|
||||
const query = createQuery()
|
||||
let spaces: Space[] = []
|
||||
let shownSpaces: Space[] = []
|
||||
@ -100,7 +102,7 @@
|
||||
{#if showDivider}<TreeSeparator />{/if}
|
||||
|
||||
{#each model.spaces as m (m.label)}
|
||||
<SpacesNav spaces={shownSpaces} {currentSpace} model={m} on:space/>
|
||||
<SpacesNav spaces={shownSpaces.filter(it => hierarchy.isDerived(it._class, m.spaceClass))} {currentSpace} model={m} on:space/>
|
||||
{/each}
|
||||
{#if model.specials}
|
||||
{#each bottomSpecials as special}
|
||||
|
Loading…
Reference in New Issue
Block a user