diff --git a/api/js/etemplate/Et2Select/SearchMixin.ts b/api/js/etemplate/Et2Select/SearchMixin.ts index eabf1c12bb..ec4fe0f830 100644 --- a/api/js/etemplate/Et2Select/SearchMixin.ts +++ b/api/js/etemplate/Et2Select/SearchMixin.ts @@ -978,7 +978,7 @@ export const Et2WithSearchMixin = >(superclass // Remove remote options that aren't used let keepers = this._selected_remote.reduce((prev, current) => { - return ":not([value='" + current.value.replace(/'/g, "\\\'") + "'])"; + return prev + ":not([value='" + current.value.replace(/'/g, "\\\'") + "'])"; }, ""); target.querySelectorAll(".remote" + keepers).forEach(o => o.remove()); target.childNodes.forEach((n) =>