Focus on the search input when the search icon is clicked
This commit is contained in:
parent
3f4cb1d58e
commit
254648991d
@ -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 New Issue
Block a user