mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-09 01:25:22 +01:00
Fix missing value in some static option selects
Shoelace select initially rejects the value due to missing option, and needs to be re-set once our options have arrived
This commit is contained in:
parent
5eaf6a275f
commit
3cf4cbab9a
@ -91,6 +91,7 @@ export class Et2SelectAccount extends SelectAccountMixin(Et2StaticSelectMixin(Et
|
||||
return Promise.all(fetch).then(() =>
|
||||
{
|
||||
this.requestUpdate("select_options");
|
||||
this.value = this.value;
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -82,6 +82,12 @@ export const Et2StaticSelectMixin = <T extends Constructor<Et2WidgetWithSelect>>
|
||||
{
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user