): void {
if (changedProperties.has("query")) {
const searchEvent: SearchEventType = new (CustomEvent as NamedEvent)("search", {
bubbles: true,
composed: false,
detail: { query: this.#query },
});
this.dispatchEvent(searchEvent);
}
}
override render() {
return html`
{
this.#query = this.inputRef.value?.value || "";
if (!this.#query) {
// Update cleared/empty value immediately
this.requestUpdate("query");
} else {
this.throttledSearch()
}
}}
@keydown=${inputClearAndBlurOnEscape}
@keyup=${inputConsume}
placeholder=${this.placeholder || msg("Search...")}
size="4"
/>
this.clear()} kind="icon" part="wy-input-group-button-icon wy-input-group-button-icon-overlay">
`;
}
}