diff --git a/packages/web/src/elements/DropDownButton.svelte b/packages/web/src/elements/DropDownButton.svelte index e60c92f6..ab35a63a 100644 --- a/packages/web/src/elements/DropDownButton.svelte +++ b/packages/web/src/elements/DropDownButton.svelte @@ -13,7 +13,7 @@ const rect = domButton.getBoundingClientRect(); const left = rect.left; const top = rect.bottom; - currentDropDownMenu.set({ left, top, items: _.isFunction(menu) ? menu() : menu }); + currentDropDownMenu.set({ left, top, items: menu }); } diff --git a/packages/web/src/modals/CurrentDropDownMenu.svelte b/packages/web/src/modals/CurrentDropDownMenu.svelte index f8411a80..8a81a4bc 100644 --- a/packages/web/src/modals/CurrentDropDownMenu.svelte +++ b/packages/web/src/modals/CurrentDropDownMenu.svelte @@ -8,7 +8,7 @@ ($currentDropDownMenu = null)} /> {/if} diff --git a/packages/web/src/modals/DropDownMenu.svelte b/packages/web/src/modals/DropDownMenu.svelte index 84729542..fb3165a5 100644 --- a/packages/web/src/modals/DropDownMenu.svelte +++ b/packages/web/src/modals/DropDownMenu.svelte @@ -48,6 +48,7 @@ import { createEventDispatcher } from 'svelte'; import { onMount } from 'svelte'; import { commands } from '../stores'; + import { extractMenuItems } from '../utility/contextMenu'; export let items; export let top; @@ -66,6 +67,8 @@ onMount(() => { fixPopupPlacement(element); }); + + $: extracted = extractMenuItems(items);