Allow autofocus to be set on an autocomplete input

This commit is contained in:
JC Brand 2022-06-01 22:03:24 +02:00
parent 1ad6de2dd6
commit 4c8bc187b2
1 changed files with 2 additions and 0 deletions

View File

@ -7,6 +7,7 @@ import { html } from 'lit';
export default class AutoCompleteComponent extends CustomElement {
static get properties () {
return {
'autofocus': { type: Boolean },
'getAutoCompleteList': { type: Function },
'auto_evaluate': { type: Boolean },
'auto_first': { type: Boolean }, // Should the first element be automatically selected?
@ -36,6 +37,7 @@ export default class AutoCompleteComponent extends CustomElement {
<div class="suggestion-box suggestion-box__name">
<ul class="suggestion-box__results suggestion-box__results--above" hidden=""></ul>
<input
?autofocus=${this.autofocus}
type="text"
name="${this.name}"
autocomplete="off"