Fix date-duration did not show selected properly

This commit is contained in:
nathan 2023-09-25 09:51:06 -06:00
parent 735b52b38b
commit d33377e17d

View File

@ -611,14 +611,14 @@ export class Et2DateDuration extends Et2InputWidget(FormControlMixin(LitElement)
}; };
// It would be nice to use an et2-select here, but something goes weird with the styling // It would be nice to use an et2-select here, but something goes weird with the styling
return html` return html`
<et2-select value="${this._display.unit || this.displayFormat[0]}"> <sl-select value="${this._display.unit || this.displayFormat[0]}">
${[...this.displayFormat].map((format : string) => ${[...this.displayFormat].map((format : string) =>
html` html`
<sl-option value=${format}> <sl-option value=${format}>
${this.time_formats[format]} ${this.time_formats[format]}
</sl-option>` </sl-option>`
)} )}
</et2-select> </sl-select>
`; `;
} }