Skip to content

Commit 4c8bc18

Browse files
committed
Allow autofocus to be set on an autocomplete input
1 parent 1ad6de2 commit 4c8bc18

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/shared/autocomplete/component.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { html } from 'lit';
77
export default class AutoCompleteComponent extends CustomElement {
88
static get properties () {
99
return {
10+
'autofocus': { type: Boolean },
1011
'getAutoCompleteList': { type: Function },
1112
'auto_evaluate': { type: Boolean },
1213
'auto_first': { type: Boolean }, // Should the first element be automatically selected?
@@ -36,6 +37,7 @@ export default class AutoCompleteComponent extends CustomElement {
3637
<div class="suggestion-box suggestion-box__name">
3738
<ul class="suggestion-box__results suggestion-box__results--above" hidden=""></ul>
3839
<input
40+
?autofocus=${this.autofocus}
3941
type="text"
4042
name="${this.name}"
4143
autocomplete="off"

0 commit comments

Comments
 (0)