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,
|
default: false,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
autofocus: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
|
||||||
label: {
|
label: {
|
||||||
type: String,
|
type: String,
|
||||||
},
|
},
|
||||||
|
@ -194,6 +199,8 @@ export default {
|
||||||
|
|
||||||
mounted() {
|
mounted() {
|
||||||
document.addEventListener("click", this.onDocumentClick)
|
document.addEventListener("click", this.onDocumentClick)
|
||||||
|
if (this.autofocus)
|
||||||
|
this.$refs.input.focus()
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in a new issue