From 47e04c363c7f9894c387988a0063a86a4be19fde Mon Sep 17 00:00:00 2001 From: Dean Date: Wed, 10 Jan 2024 14:52:16 +0000 Subject: [PATCH] Disable eject for blocks if ejectable has been set to false --- .../_components/ComponentList/ComponentDropdownMenu.svelte | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/builder/src/pages/builder/app/[application]/design/[screenId]/_components/ComponentList/ComponentDropdownMenu.svelte b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/_components/ComponentList/ComponentDropdownMenu.svelte index aeaa577455..052c06b213 100644 --- a/packages/builder/src/pages/builder/app/[application]/design/[screenId]/_components/ComponentList/ComponentDropdownMenu.svelte +++ b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/_components/ComponentList/ComponentDropdownMenu.svelte @@ -7,6 +7,7 @@ $: definition = store.actions.components.getDefinition(component?._component) $: noPaste = !$store.componentToPaste $: isBlock = definition?.block === true + $: canEject = !(definition?.ejectable === false) const keyboardEvent = (key, ctrlKey = false) => { document.dispatchEvent( @@ -32,7 +33,7 @@ > Delete - {#if isBlock} + {#if isBlock && canEject}