diff --git a/api/js/etemplate/Et2Button/Et2Button.ts b/api/js/etemplate/Et2Button/Et2Button.ts index db1c1d70bd..061b32f381 100644 --- a/api/js/etemplate/Et2Button/Et2Button.ts +++ b/api/js/etemplate/Et2Button/Et2Button.ts @@ -178,13 +178,13 @@ export class Et2Button extends Et2InputWidget(SlotMixin(LionButton)) let image = this._get_default_image(this._widget_id); if(image != this._image) { - this.image = this._get_default_image(this._widget_id); + this.image = image; } } let default_class = this._get_default_class(this._widget_id); if(default_class && !this.classList.contains(default_class)) { - this.classList.add(this._get_default_class(this._widget_id)); + this.classList.add(default_class); } } } diff --git a/api/js/etemplate/Et2InputWidget/Et2InputWidget.ts b/api/js/etemplate/Et2InputWidget/Et2InputWidget.ts index c6221dfc91..d3e2e8894d 100644 --- a/api/js/etemplate/Et2InputWidget/Et2InputWidget.ts +++ b/api/js/etemplate/Et2InputWidget/Et2InputWidget.ts @@ -57,6 +57,11 @@ const Et2InputWidgetMixin = (superclass) => attribute: 'readonly', reflect: true, }, + // readonly is what is in the templates + // I put this in here so loadWebComponent finds it when it tries to set it from the template + readonly: { + type: Boolean + } }; }