forked from AkkomaGang/akkoma-fe
Focus on the search input when the search icon is clicked
This commit is contained in:
parent
3f4cb1d58e
commit
254648991d
1 changed files with 5 additions and 0 deletions
|
@ -20,6 +20,11 @@ const SearchBar = {
|
||||||
toggleHidden () {
|
toggleHidden () {
|
||||||
this.hidden = !this.hidden
|
this.hidden = !this.hidden
|
||||||
this.$emit('toggled', this.hidden)
|
this.$emit('toggled', this.hidden)
|
||||||
|
this.$nextTick(() => {
|
||||||
|
if (!this.hidden) {
|
||||||
|
this.$refs.searchInput.focus()
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue