mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-04 04:19:41 +01:00
Et2Select: Fix some missing "emptyLabel" bugs
- If there were no select_options, and an invalid value, empty label was not shown (Infolog pricelist) - Select Number had numeric values for options which did not match string values (Infolog completed)
This commit is contained in:
parent
5cfa26bd7b
commit
6458511d75
@ -229,7 +229,7 @@ export class Et2Select extends Et2WithSearchMixin(Et2WidgetWithSelect)
|
||||
*/
|
||||
private fix_bad_value()
|
||||
{
|
||||
if(this.multiple || !Array.isArray(this.select_options) || this.select_options.length == 0)
|
||||
if(this.multiple || (!this.emptyLabel && (!Array.isArray(this.select_options) || this.select_options.length == 0)))
|
||||
{
|
||||
// Nothing to do here
|
||||
return;
|
||||
|
@ -244,7 +244,7 @@ export class StaticOptions
|
||||
|
||||
for(var i = 0, n = min; n <= max && i <= 100; n += interval, ++i)
|
||||
{
|
||||
options.push({value: n, label: sprintf(format, n)});
|
||||
options.push({value: "" + n, label: sprintf(format, n)});
|
||||
}
|
||||
return options;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user