Put additonal options to static select before the static options

This commit is contained in:
nathan 2023-09-25 08:50:36 -06:00
parent e504573269
commit 5601897dbb

View File

@ -67,7 +67,7 @@ export const Et2StaticSelectMixin = <T extends Constructor<Et2WidgetWithSelect>>
return options; return options;
} }
// Merge & make sure result is unique // Merge & make sure result is unique
return [...new Map([...(this._static_options || []), ...options].map(item => return [...new Map([...options, ...(this._static_options || [])].map(item =>
[item.value, item])).values()]; [item.value, item])).values()];
} }