Merge pull request #2425 from umbraco/v15/feature/minor-custom-view-example-update

Chore: Block Custom View — update comment and example
This commit is contained in:
Niels Lyngsø
2024-10-09 10:30:58 +02:00
committed by GitHub
3 changed files with 4 additions and 2 deletions

View File

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

View File

@@ -5,6 +5,6 @@ export const manifests: Array<UmbExtensionManifest> = [
name: 'Block Editor Custom View Test',
element: () => import('./block-custom-view.js'),
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) => {
// 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 (
manifest.forContentTypeAlias &&
!stringOrStringArrayContains(manifest.forContentTypeAlias, this._contentTypeAlias!)