correct code that hides add button

This commit is contained in:
Niels Lyngsø
2024-03-18 22:29:26 +01:00
parent 263b75a747
commit 1447a91249
5 changed files with 6 additions and 5 deletions

View File

@@ -177,7 +177,7 @@ export class UmbInputDocumentElement extends FormControlMixin(UmbLitElement) {
}
#renderAddButton() {
if (this.max > 0 && this.selection.length >= this.max) return;
if (this.max === 1 && this.selection.length >= this.max) return;
return html`<uui-button
id="add-button"
look="placeholder"

View File

@@ -112,6 +112,7 @@ export class UmbInputMemberGroupElement extends FormControlMixin(UmbLitElement)
constructor() {
super();
// TODO: This would have to be more specific if used in a property editor context... [NL]
new UmbModalRouteRegistrationController(this, UMB_WORKSPACE_MODAL)
.addAdditionalPath('member-group')
.onSetup(() => {
@@ -183,7 +184,7 @@ export class UmbInputMemberGroupElement extends FormControlMixin(UmbLitElement)
}
#renderAddButton() {
if (this.max > 0 && this.selection.length >= this.max) return;
if (this.max === 1 && this.selection.length >= this.max) return;
return html`<uui-button
id="add-button"
look="placeholder"

View File

@@ -121,7 +121,7 @@ export class UmbInputMemberTypeElement extends FormControlMixin(UmbLitElement) {
}
#renderAddButton() {
if (this.max > 0 && this.selection.length >= this.max) return;
if (this.max === 1 && this.selection.length >= this.max) return;
return html`
<uui-button
id="add-button"

View File

@@ -183,7 +183,7 @@ export class UmbInputMemberElement extends FormControlMixin(UmbLitElement) {
}
#renderAddButton() {
if (this.max > 0 && this.selection.length >= this.max) return;
if (this.max === 1 && this.selection.length >= this.max) return;
return html`<uui-button
id="add-button"
look="placeholder"

View File

@@ -114,7 +114,7 @@ export class UmbInputStaticFileElement extends FormControlMixin(UmbLitElement) {
}
#renderAddButton() {
if (this.max > 0 && this.selection.length >= this.max) return;
if (this.max === 1 && this.selection.length >= this.max) return;
return html`<uui-button
id="add-button"
look="placeholder"