Et2Select: Fix additional entry selected after closing option list

Sometimes after searching and selecting an entry from the results, when the list was closed an additional option was added
This commit is contained in:
nathan 2023-12-14 10:00:36 -07:00
parent 885c3fed0a
commit da93788c1d

View File

@ -16,6 +16,7 @@ import {dedupeMixin} from "@open-wc/dedupe-mixin";
import {SlOption} from "@shoelace-style/shoelace";
import {Et2Textbox} from "../Et2Textbox/Et2Textbox";
import {until} from "lit/directives/until.js";
import {waitForEvent} from "../Et2Widget/event";
// Otherwise import gets stripped
let keep_import : Et2Tag;
@ -770,7 +771,7 @@ export const Et2WithSearchMixin = dedupeMixin(<T extends Constructor<LitElement>
}
this.removeAttribute("open");
this.clearSearch();
waitForEvent(this, "sl-after-hide").then(() => this.clearSearch());
// Reset display
if(this._searchInputNode)