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 bf7106cf86
commit 71806e051e

View File

@ -62,7 +62,7 @@ export const Et2StaticSelectMixin = <T extends Constructor<Et2WidgetWithSelect>>
return options;
}
// 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()];
}