SearchMixin: Fix selecting multiple remote values only showed the last

This commit is contained in:
nathan 2022-12-08 10:24:49 -07:00
parent 409b2a4349
commit be5125509e

View File

@ -978,7 +978,7 @@ export const Et2WithSearchMixin = <T extends Constructor<LitElement>>(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) =>