Disable eject for blocks if ejectable has been set to false

This commit is contained in:
Dean 2024-01-10 14:52:16 +00:00
parent c0bd897b15
commit 47e04c363c
1 changed files with 2 additions and 1 deletions

View File

@ -7,6 +7,7 @@
$: definition = store.actions.components.getDefinition(component?._component) $: definition = store.actions.components.getDefinition(component?._component)
$: noPaste = !$store.componentToPaste $: noPaste = !$store.componentToPaste
$: isBlock = definition?.block === true $: isBlock = definition?.block === true
$: canEject = !(definition?.ejectable === false)
const keyboardEvent = (key, ctrlKey = false) => { const keyboardEvent = (key, ctrlKey = false) => {
document.dispatchEvent( document.dispatchEvent(
@ -32,7 +33,7 @@
> >
Delete Delete
</MenuItem> </MenuItem>
{#if isBlock} {#if isBlock && canEject}
<MenuItem <MenuItem
icon="Export" icon="Export"
keyBind="Ctrl+E" keyBind="Ctrl+E"