Skip to content

Commit

Permalink
autocomplete search from side nav
Browse files Browse the repository at this point in the history
  • Loading branch information
queryluke committed May 15, 2019
1 parent 7c7be34 commit 0c444f9
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions components/SideNavigation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
export default {
data () {
return {
search: '',
items: [
{
header: 'Player\'s Manual'
Expand Down Expand Up @@ -144,7 +143,7 @@
}
},
computed: {
...mapGetters(['bookmarkCount', 'getVersion']),
...mapGetters(['bookmarkCount', 'getVersion', 'phbSearch']),
isActive: {
get () {
return this.$store.state.sidebar
Expand All @@ -153,14 +152,25 @@
this.$store.commit('toggleSidebar', val)
}
},
search: {
get () {
return this.phbSearch
},
set (val) {
this.setPhbSearch(val)
}
}
},
methods: {
...mapActions(['setPhbSearch']),
submit() {
this.setPhbSearch(this.search)
this.$router.push({
path: '/phb/search'
})
if (this.$vuetify.breakpoint.mdAndDown) {
this.isActive = false
}
}
}
}
Expand Down

0 comments on commit 0c444f9

Please sign in to comment.