Et2Select: (multiple=false) When searching and user selects a value, abort search and show all non-matching entries again

This commit is contained in:
nathan 2022-08-25 15:51:15 -06:00
parent 4d8bd89952
commit b136958425

View File

@ -575,17 +575,25 @@ export const Et2WithSearchMixin = <T extends Constructor<LitElement>>(superclass
});
}
}
else if(!this.multiple && this.searchEnabled)
{
// Stop all the search stuff when they select an option
// this shows all non-matching options again
this._handleSearchAbort(event);
}
}
/**
* Value was cleared
*/
_handleClear()
_handleClear(e)
{
this._selected_remote = [];
if(!this.multiple && this.searchEnabled)
{
this._handleSearchAbort(e);
// Restore label styling
this.shadowRoot.querySelector("[part='display-label']").style.display = "";