diff --git a/api/js/etemplate/Et2Select/Select/Et2SelectAccount.ts b/api/js/etemplate/Et2Select/Select/Et2SelectAccount.ts index e92f9b0ecd..ecb4582e51 100644 --- a/api/js/etemplate/Et2Select/Select/Et2SelectAccount.ts +++ b/api/js/etemplate/Et2Select/Select/Et2SelectAccount.ts @@ -91,6 +91,7 @@ export class Et2SelectAccount extends SelectAccountMixin(Et2StaticSelectMixin(Et return Promise.all(fetch).then(() => { this.requestUpdate("select_options"); + this.value = this.value; }); } diff --git a/api/js/etemplate/Et2Select/Select/Et2SelectCategory.ts b/api/js/etemplate/Et2Select/Select/Et2SelectCategory.ts index 084627bcc5..3985170142 100644 --- a/api/js/etemplate/Et2Select/Select/Et2SelectCategory.ts +++ b/api/js/etemplate/Et2Select/Select/Et2SelectCategory.ts @@ -91,6 +91,12 @@ export class Et2SelectCategory extends Et2StaticSelectMixin(Et2Select) { this._static_options = cleanSelectOptions(options); this.requestUpdate("select_options"); + + // Shoelace select has rejected our value due to missing option by now, so re-set it + this.updateComplete.then(() => + { + this.value = this.value; + }); }); } } diff --git a/api/js/etemplate/Et2Select/StaticOptions.ts b/api/js/etemplate/Et2Select/StaticOptions.ts index 99e7a6c2e8..ee772f5418 100644 --- a/api/js/etemplate/Et2Select/StaticOptions.ts +++ b/api/js/etemplate/Et2Select/StaticOptions.ts @@ -82,6 +82,12 @@ export const Et2StaticSelectMixin = > { this._static_options = new_static_options; this.requestUpdate("select_options"); + + // Shoelace select may have rejected our value due to missing option by now, so re-set it + if(this.value && this.select && this.value !== this.select.value) + { + this.value = this.value; + } } /**