Allow autofocus to be set on an autocomplete input
This commit is contained in:
parent
1ad6de2dd6
commit
4c8bc187b2
@ -7,6 +7,7 @@ import { html } from 'lit';
|
|||||||
export default class AutoCompleteComponent extends CustomElement {
|
export default class AutoCompleteComponent extends CustomElement {
|
||||||
static get properties () {
|
static get properties () {
|
||||||
return {
|
return {
|
||||||
|
'autofocus': { type: Boolean },
|
||||||
'getAutoCompleteList': { type: Function },
|
'getAutoCompleteList': { type: Function },
|
||||||
'auto_evaluate': { type: Boolean },
|
'auto_evaluate': { type: Boolean },
|
||||||
'auto_first': { type: Boolean }, // Should the first element be automatically selected?
|
'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">
|
<div class="suggestion-box suggestion-box__name">
|
||||||
<ul class="suggestion-box__results suggestion-box__results--above" hidden=""></ul>
|
<ul class="suggestion-box__results suggestion-box__results--above" hidden=""></ul>
|
||||||
<input
|
<input
|
||||||
|
?autofocus=${this.autofocus}
|
||||||
type="text"
|
type="text"
|
||||||
name="${this.name}"
|
name="${this.name}"
|
||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
|
Loading…
Reference in New Issue
Block a user