mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-27 02:14:45 +01:00
Make sure options are clean before trying to merge them. Fixers broken historylog.
Also filter out duplicate options.
This commit is contained in:
parent
2bcebeed42
commit
3b147eaa49
@ -116,8 +116,9 @@ export function find_select_options(widget, attr_options?, options : SelectOptio
|
||||
}
|
||||
if(attr_options && Object.keys(attr_options).length > 0 && content_options)
|
||||
{
|
||||
//content_options = jQuery.extend(true, {}, attr_options, content_options);
|
||||
content_options = [...attr_options, ...content_options];
|
||||
// Clean, merge and filter out duplicates
|
||||
content_options = [...new Map([...cleanSelectOptions(options), ...cleanSelectOptions(content_options || [])].map(item =>
|
||||
[item.value, item])).values()];
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user