diff --git a/src/Umbraco.Web.UI.Client/src/packages/block/block-list/property-editors/block-list-editor/property-editor-ui-block-list.element.ts b/src/Umbraco.Web.UI.Client/src/packages/block/block-list/property-editors/block-list-editor/property-editor-ui-block-list.element.ts index d21e30ca8c..8d1d2e19a0 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/block/block-list/property-editors/block-list-editor/property-editor-ui-block-list.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/block/block-list/property-editors/block-list-editor/property-editor-ui-block-list.element.ts @@ -9,11 +9,36 @@ import type { UmbPropertyEditorConfigCollection } from '@umbraco-cms/backoffice/ */ @customElement('umb-property-editor-ui-block-list') export class UmbPropertyEditorUIBlockListElement extends UmbLitElement implements UmbPropertyEditorUiElement { - @property() - value = ''; + private _value: Array = []; + + @property({ type: Array }) + public get value(): Array { + return this._value; + } + public set value(value: Array) { + this._value = value || []; + } @property({ attribute: false }) - public config?: UmbPropertyEditorConfigCollection; + public set config(config: UmbPropertyEditorConfigCollection | undefined) { + const validationLimit = config['validationLimit']; + + this._limitMin = (validationLimit?.value as any)?.min; + this._limitMax = (validationLimit?.value as any)?.max; + + //config.blocks + //config.useSingleBlockMode + //config.useLiveEditing + //config.useInlineEditingAsDefault + this._maxPropertyWidth = config.maxPropertyWidth; + } + + @state() + private _limitMin?: number; + @state() + private _limitMax?: number; + @state() + private _maxPropertyWidth?: string; render() { return html`
umb-property-editor-ui-block-list
`;