From 3a2a3865f487ca69f42bacae0383830ec060486f Mon Sep 17 00:00:00 2001 From: Danila Poyarkov Date: Wed, 22 Apr 2026 14:16:14 +0300 Subject: [PATCH] fix(vue): enable Create Instance menu item for components MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The disabled flag was inverted — the manually constructed menu item used `!commandMenuItem(...).disabled` which made the item disabled when the command was enabled, and vice versa. Replaced with a direct commandMenuItem() call which handles label, disabled, and action correctly. Fixes #223 --- packages/vue/src/commands/useMenuModel.ts | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/packages/vue/src/commands/useMenuModel.ts b/packages/vue/src/commands/useMenuModel.ts index 8f88f35b9..86ba861eb 100644 --- a/packages/vue/src/commands/useMenuModel.ts +++ b/packages/vue/src/commands/useMenuModel.ts @@ -103,13 +103,7 @@ export function useMenuModel() { ? [commandMenuItem('selection.createComponentSet', '⇧⌘K')] : []), ...(isComponent.value && selectedNode.value - ? [ - { - label: t.value.createInstance, - action: () => commandMenuItem('selection.createInstance').action?.(), - disabled: !commandMenuItem('selection.createInstance').disabled - } satisfies MenuActionNode - ] + ? [commandMenuItem('selection.createInstance')] : []), ...(isInstance.value ? [commandMenuItem('selection.goToMainComponent')] : []), ...(isInstance.value ? [commandMenuItem('selection.detachInstance', '⌥⌘B')] : []),