= 0
? `roxy-location-option-${this.highlight}`
: ''
}
aria-autocomplete="list"
autocomplete="off"
placeholder=${this.placeholder}
.value=${this.query}
@input=${this.onInput}
@keydown=${this.onKeyDown}
@focus=${() => {
if (this.results.length > 0) this.isOpen = true;
}}
/>
${this.isLoading ? html`
` : nothing}
${
this.isOpen
? html`
${
this.results.length === 0
? html`- No cities found
`
: this.results.map(
(city, idx) => html`-
`,
)
}
`
: nothing
}
`;
}
}
declare global {
interface HTMLElementTagNameMap {
'roxy-location-search': RoxyLocationSearch;
}
}