mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-23 08:23:12 +01:00
fix et2-select use first option, not just empty_lable, if value is not in options
This commit is contained in:
parent
a6d297afb7
commit
e567a0d465
@ -235,8 +235,8 @@ export class Et2Select extends Et2WidgetWithSelect
|
||||
{
|
||||
if(this.get_select_options().length > 0 && this.get_select_options().filter((option) => option.value == this.modalValue).length === 0)
|
||||
{
|
||||
// Not in list, clear it
|
||||
this.modalValue = "";
|
||||
// Not in list, use first option
|
||||
this.modalValue = this.get_select_options()[0]?.value || "";
|
||||
}
|
||||
// Re-set value, the option for it may have just shown up
|
||||
this._inputNode.value = this.modalValue || "";
|
||||
|
Loading…
Reference in New Issue
Block a user