fix broken create block in workspace experience

This commit is contained in:
Niels Lyngsø
2024-08-26 20:36:05 +02:00
parent 04c9311839
commit d2b2a8efc2
4 changed files with 4 additions and 2 deletions

View File

@@ -133,6 +133,7 @@ export class UmbBlockGridEntriesContext
blockGroups: this._manager?.getBlockGroups() ?? [],
openClipboard: routingInfo.view === 'clipboard',
originData: { index: index, areaKey: this.#areaKey, parentUnique: this.#parentUnique },
createBlockInWorkspace: true,
},
};
})

View File

@@ -41,6 +41,7 @@ export class UmbBlockRteEntriesContext extends UmbBlockEntriesContext<
blockGroups: [],
openClipboard: routingInfo.view === 'clipboard',
originData: {},
createBlockInWorkspace: true,
},
};
})

View File

@@ -21,7 +21,7 @@ export class UmbBlockTypeCardElement extends UmbLitElement {
(x) => x.unique,
);
@property({ type: String, attribute: false })
@property({ type: String })
href?: string;
@property({ type: String, attribute: false })

View File

@@ -140,7 +140,7 @@ export class UmbBlockCatalogueModalElement extends UmbModalBaseElement<
.backgroundColor=${block.backgroundColor}
.contentElementTypeKey=${block.contentElementTypeKey}
@open=${() => this.#chooseBlock(block.contentElementTypeKey)}
?href=${this._workspacePath
.href=${this._workspacePath
? `${this._workspacePath}create/${block.contentElementTypeKey}`
: undefined}>
</umb-block-type-card>