Skip to content

Commit

Permalink
fix: add textarea autofocus
Browse files Browse the repository at this point in the history
  • Loading branch information
tangjinzhou committed Jun 10, 2018
1 parent 3cff629 commit 7879279
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion components/input/TextArea.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,12 @@ export default {
},
},
mounted () {
this.resizeTextarea()
this.$nextTick(() => {
this.resizeTextarea()
if (this.autoFocus) {
this.focus()
}
})
},
methods: {
handleKeyDown (e) {
Expand Down

0 comments on commit 7879279

Please sign in to comment.