* Clipboard label for nested block item * Falsey check
This commit is contained in:
@@ -84,7 +84,12 @@ export class UmbBlockElementManager<LayoutDataType extends UmbBlockLayoutBaseMod
|
||||
|
||||
// Ugly, but we just inherit these from the workspace context: [NL]
|
||||
this.name = host.name;
|
||||
this.getName = host.getName;
|
||||
|
||||
this.getName = () => {
|
||||
const contentTypeLabel = this.structure.getOwnerContentType()?.name;
|
||||
const blockLabel = host.getName();
|
||||
return contentTypeLabel ? `${contentTypeLabel} ${blockLabel}` : blockLabel;
|
||||
};
|
||||
|
||||
this.propertyViewGuard.fallbackToPermitted();
|
||||
this.propertyWriteGuard.fallbackToPermitted();
|
||||
@@ -94,6 +99,7 @@ export class UmbBlockElementManager<LayoutDataType extends UmbBlockLayoutBaseMod
|
||||
this.structure.loadType(id);
|
||||
}
|
||||
});
|
||||
|
||||
this.observe(this.unique, (key) => {
|
||||
if (key) {
|
||||
this.validation.setDataPath('$.' + dataPathPropertyName + `[?(@.key == '${key}')]`);
|
||||
|
||||
@@ -26,6 +26,7 @@ import { UmbVariantId } from '@umbraco-cms/backoffice/variant';
|
||||
import type { UUIModalSidebarSize } from '@umbraco-cms/backoffice/external/uui';
|
||||
|
||||
export type UmbBlockWorkspaceElementManagerNames = 'content' | 'settings';
|
||||
|
||||
export class UmbBlockWorkspaceContext<LayoutDataType extends UmbBlockLayoutBaseModel = UmbBlockLayoutBaseModel>
|
||||
extends UmbSubmittableWorkspaceContextBase<LayoutDataType>
|
||||
implements UmbRoutableWorkspaceContext
|
||||
@@ -470,7 +471,7 @@ export class UmbBlockWorkspaceContext<LayoutDataType extends UmbBlockLayoutBaseM
|
||||
}
|
||||
|
||||
getName() {
|
||||
return 'block name content element type here...';
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -70,4 +70,5 @@ export class UmbCopyToClipboardPropertyAction extends UmbPropertyActionBase<Meta
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
export { UmbCopyToClipboardPropertyAction as api };
|
||||
|
||||
Reference in New Issue
Block a user