DocumentPicker: Added value handling for legacy/migrated data
If the input `value` is a `string`, then we can handle that as an `string[]`
This commit is contained in:
@@ -163,7 +163,7 @@ export class UmbInputDocumentElement extends FormControlMixin(UmbLitElement) {
|
||||
}
|
||||
|
||||
#renderItems() {
|
||||
if (!this._items) return;
|
||||
if (!this._items?.length) return;
|
||||
return html`<uui-ref-list>
|
||||
${repeat(
|
||||
this._items,
|
||||
|
||||
@@ -13,7 +13,7 @@ export class UmbPropertyEditorUIDocumentPickerElement extends UmbLitElement impl
|
||||
return this._value;
|
||||
}
|
||||
public set value(value: Array<string>) {
|
||||
this._value = value || [];
|
||||
this._value = Array.isArray(value) ? value : value ? [value] : [];
|
||||
}
|
||||
|
||||
@property({ attribute: false })
|
||||
|
||||
Reference in New Issue
Block a user