diff --git a/api/js/etemplate/Et2Button/Et2ButtonIcon.ts b/api/js/etemplate/Et2Button/Et2ButtonIcon.ts index 3f610b00ad..81b48293b1 100644 --- a/api/js/etemplate/Et2Button/Et2ButtonIcon.ts +++ b/api/js/etemplate/Et2Button/Et2ButtonIcon.ts @@ -45,7 +45,8 @@ export class Et2ButtonIcon extends ButtonMixin(Et2InputWidget(SlIconButton)) } if(new_image && !this.src) { - this.__name = new_image; + // For some reason setting it directly does not show the image + this.updateComplete.then(() => this.name = new_image); } } @@ -53,16 +54,6 @@ export class Et2ButtonIcon extends ButtonMixin(Et2InputWidget(SlIconButton)) { return this.src || this.name; } - - set name(name) - { - // No - use image to avoid conflicts between our icons & SlIconButton's image/url loading - } - - get name() - { - return super.name; - } } customElements.define("et2-button-icon", Et2ButtonIcon); \ No newline at end of file