update comment and example

This commit is contained in:
Niels Lyngsø
2024-10-08 13:36:56 +02:00
parent faa76000bb
commit 77cb1e39a5
3 changed files with 4 additions and 2 deletions

View File

@@ -32,7 +32,8 @@ export class ExampleBlockCustomView extends UmbElementMixin(LitElement) implemen
display: block; display: block;
height: 100%; height: 100%;
box-sizing: border-box; box-sizing: border-box;
background-color: #dddddd; background-color: red;
color: white;
border-radius: 9px; border-radius: 9px;
padding: 12px; padding: 12px;
} }

View File

@@ -5,6 +5,6 @@ export const manifests: Array<UmbExtensionManifest> = [
name: 'Block Editor Custom View Test', name: 'Block Editor Custom View Test',
element: () => import('./block-custom-view.js'), element: () => import('./block-custom-view.js'),
forContentTypeAlias: 'headlineUmbracoDemoBlock', forContentTypeAlias: 'headlineUmbracoDemoBlock',
forBlockEditor: 'block-list', forBlockEditor: ['block-list', 'block-grid'],
}, },
]; ];

View File

@@ -363,6 +363,7 @@ export class UmbBlockGridEntryElement extends UmbLitElement implements UmbProper
}; };
#extensionSlotFilterMethod = (manifest: ManifestBlockEditorCustomView) => { #extensionSlotFilterMethod = (manifest: ManifestBlockEditorCustomView) => {
// We do have _contentTypeAlias at this stage, cause we do use the filter method in the extension slot which first gets rendered when we have the _contentTypeAlias. [NL]
if ( if (
manifest.forContentTypeAlias && manifest.forContentTypeAlias &&
!stringOrStringArrayContains(manifest.forContentTypeAlias, this._contentTypeAlias!) !stringOrStringArrayContains(manifest.forContentTypeAlias, this._contentTypeAlias!)