Et2Select: Cancel search timer on blur and menu close

If we don't, results might come back after we leave/close and re-open
This commit is contained in:
nathan 2022-10-17 09:56:58 -06:00
parent b19d75874a
commit bd62279f55

View File

@ -655,6 +655,7 @@ export const Et2WithSearchMixin = <T extends Constructor<LitElement>>(superclass
{
return;
}
clearTimeout(this._searchTimeout);
super.handleMenuHide();
// Reset display
@ -787,6 +788,7 @@ export const Et2WithSearchMixin = <T extends Constructor<LitElement>>(superclass
*/
async _handleSearchBlur(event : FocusEvent)
{
clearTimeout(this._searchTimeout);
if(event.relatedTarget && this !== (<Element>event.relatedTarget).parentElement)
{
await this.dropdown.hide();