diff --git a/api/js/etemplate/Et2Description/Et2Description.ts b/api/js/etemplate/Et2Description/Et2Description.ts index 933e64ece95..4090043ea59 100644 --- a/api/js/etemplate/Et2Description/Et2Description.ts +++ b/api/js/etemplate/Et2Description/Et2Description.ts @@ -206,7 +206,7 @@ export class Et2Description extends Et2Widget(LitElement) implements et2_IDetach { render = html`${this.value}`; } - return render; + return html`${render}`; } render() diff --git a/api/js/etemplate/Et2Textbox/Et2NumberReadonly.ts b/api/js/etemplate/Et2Textbox/Et2NumberReadonly.ts index 5305b622a0e..0814753c70d 100644 --- a/api/js/etemplate/Et2Textbox/Et2NumberReadonly.ts +++ b/api/js/etemplate/Et2Textbox/Et2NumberReadonly.ts @@ -10,20 +10,31 @@ import {Et2TextboxReadonly} from "./Et2TextboxReadonly"; import {formatNumber} from "./Et2Number"; +import {property} from "lit/decorators/property.js"; +import {css} from "lit"; export class Et2NumberReadonly extends Et2TextboxReadonly { - static get properties() + static get styles() { - return { - ...super.properties, - /** - * Precision of float number or 0 for integer - */ - precision: Number, - } + return [ + ...(super.styles ? (Array.isArray(super.styles) ? super.styles : [super.styles]) : []), + css` + ::slotted(*) { + flex: 1 1 auto; + text-align: right; + padding-right: var(--sl-spacing-small); + } + `, + ]; } + /** + * Precision of float number or 0 for integer + */ + @property({type: Number}) + precision; + set_value(val) { if(val === null)