TODO comment on input-rich-media.element.ts

This commit is contained in:
Niels Lyngsø
2024-09-02 19:37:07 +02:00
committed by GitHub
parent fa68faab01
commit e14a1999ef

View File

@@ -361,6 +361,7 @@ export class UmbInputRichMediaElement extends UUIFormControlMixin(UmbLitElement,
}
#renderAddButton() {
// TODO: Stop preventing adding more, instead implement proper validation for user feedback. [NL]
if ((this._cards && this.max && this._cards.length >= this.max) || (this._cards.length && !this.multiple)) return;
if (this.readonly && this._cards.length > 0) {
return nothing;