forked from platypush/platypush
Added autofocus
support to Autocomplete
element.
This commit is contained in:
parent
923eb7cadb
commit
a717235453
1 changed files with 7 additions and 0 deletions
|
@ -52,6 +52,11 @@ export default {
|
|||
default: false,
|
||||
},
|
||||
|
||||
autofocus: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
|
||||
label: {
|
||||
type: String,
|
||||
},
|
||||
|
@ -194,6 +199,8 @@ export default {
|
|||
|
||||
mounted() {
|
||||
document.addEventListener("click", this.onDocumentClick)
|
||||
if (this.autofocus)
|
||||
this.$refs.input.focus()
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
|
Loading…
Reference in a new issue