diff --git a/api/js/etemplate/Et2Select/StaticOptions.ts b/api/js/etemplate/Et2Select/StaticOptions.ts index bf6fa218f2..8769c3122e 100644 --- a/api/js/etemplate/Et2Select/StaticOptions.ts +++ b/api/js/etemplate/Et2Select/StaticOptions.ts @@ -53,7 +53,7 @@ export const Et2StaticSelectMixin = > const options = super.select_options || []; // make sure result is unique - return [...new Map([...options, ...(this.static_options || [])].map(item => + return [...new Map([...(this.static_options || []), ...options].map(item => [item.value, item])).values()]; } diff --git a/calendar/js/CalendarOwner.ts b/calendar/js/CalendarOwner.ts index 9f69c11c7b..898387c317 100644 --- a/calendar/js/CalendarOwner.ts +++ b/calendar/js/CalendarOwner.ts @@ -89,7 +89,7 @@ export class CalendarOwner extends Et2StaticSelectMixin(Et2Select) { for(var i = 0; i < this.value.length; i++) { - if(!this.menuItems.find(o => o.value == this.value[i])) + if(!this.select_options.find(o => o.value == this.value[i])) { missing_labels.push(this.value[i]); }