diff --git a/plugins/workbench-resources/src/components/navigator/TreeElement.svelte b/plugins/workbench-resources/src/components/navigator/TreeElement.svelte index e54665c646..ef0cfd5015 100644 --- a/plugins/workbench-resources/src/components/navigator/TreeElement.svelte +++ b/plugins/workbench-resources/src/components/navigator/TreeElement.svelte @@ -17,6 +17,7 @@ import type { Asset, IntlString } from '@hcengineering/platform' import type { Action } from '@hcengineering/ui' import { ActionIcon, Icon, IconMoreV, Label, Menu, showPopup } from '@hcengineering/ui' + import { createEventDispatcher } from 'svelte' export let _id: Ref | undefined = undefined export let icon: Asset | undefined = undefined @@ -38,6 +39,8 @@ }) hovered = true } + + const dispatch = createEventDispatcher()
{ collapsed = !collapsed + dispatch('click') }} > diff --git a/plugins/workbench-resources/src/components/navigator/TreeItem.svelte b/plugins/workbench-resources/src/components/navigator/TreeItem.svelte index 31294ffc3b..7b0b568d90 100644 --- a/plugins/workbench-resources/src/components/navigator/TreeItem.svelte +++ b/plugins/workbench-resources/src/components/navigator/TreeItem.svelte @@ -17,7 +17,6 @@ import type { Asset } from '@hcengineering/platform' import type { Ref, Space } from '@hcengineering/core' import type { Action } from '@hcengineering/ui' - import { createEventDispatcher } from 'svelte' export let _id: Ref export let icon: Asset | undefined @@ -27,21 +26,6 @@ export let selected: boolean = false export let bold = false export let indent: 'default' | 'ml-2' | 'ml-4' | 'ml-8' = 'default' - - const dispatch = createEventDispatcher() - { - dispatch('click') - }} -/> +