forked from extern/egroupware
Fix additional options to a static list were not properly added if they were in correct format with value & label
This commit is contained in:
parent
a823563281
commit
1d540aa74c
@ -173,10 +173,13 @@ export function find_select_options(widget, attr_options?, options : SelectOptio
|
||||
}
|
||||
if(!added)
|
||||
{
|
||||
options.splice(parseInt(i), 0, typeof value == "object" ? value : {
|
||||
value: value,
|
||||
label: <string><unknown>content_options[i]
|
||||
});
|
||||
let insert = typeof content_options[i] == "object" && content_options[i].value === value && content_options[i].label ?
|
||||
content_options[i] :
|
||||
{
|
||||
value: value,
|
||||
label: <string><unknown>content_options[i]
|
||||
};
|
||||
options.splice(parseInt(i), 0, insert);
|
||||
}
|
||||
}
|
||||
content_options = options;
|
||||
|
Loading…
Reference in New Issue
Block a user