mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-23 16:33:17 +01:00
fist option with value of 0 was not selected
This commit is contained in:
parent
eff1f10484
commit
9260f25476
@ -238,7 +238,7 @@ export class Et2Select extends Et2WidgetWithSelect
|
|||||||
!(typeof this.empty_label !== 'undefined' && (this.modalValue||"") === ""))
|
!(typeof this.empty_label !== 'undefined' && (this.modalValue||"") === ""))
|
||||||
{
|
{
|
||||||
// --> use first option
|
// --> use first option
|
||||||
this.modalValue = this.get_select_options()[0]?.value || "";
|
this.modalValue = ""+this.get_select_options()[0]?.value; // ""+ to cast value of 0 to "0", to not replace with ""
|
||||||
}
|
}
|
||||||
// Re-set value, the option for it may have just shown up
|
// Re-set value, the option for it may have just shown up
|
||||||
this._inputNode.value = this.modalValue || "";
|
this._inputNode.value = this.modalValue || "";
|
||||||
|
Loading…
Reference in New Issue
Block a user