Make search reload the dir after closing itself

Former-commit-id: e9774417ce7c29eded0158ef18535fcad57ddc8a [formerly 1a644e3fd8e191aee49a12a660069b39b38e2c0b] [formerly c371da590eb27fbcf290e56933b279ea75384cee [formerly 9453e22559]]
Former-commit-id: aba05b88f61352b6e6afb5bf9af8c033ac8ba310 [formerly d011d5ee10fa055bc3ea35889dddb968b476eb83]
Former-commit-id: c1138ce78249872f442646d26807140a94824e0b
pull/726/head
Henrique Dias 2017-07-27 14:03:14 +01:00
parent 8b40dc9d19
commit dde01c6931
1 changed files with 8 additions and 2 deletions

View File

@ -47,7 +47,8 @@ export default {
ongoing: false,
scrollable: null,
search: [],
commands: []
commands: [],
reload: false
}
},
watch: {
@ -57,12 +58,17 @@ export default {
// If the hover was search and now it's something else
// we should blur the input.
if (old === 'search' && val !== 'search') {
if (this.reload) {
this.$store.commit('setReload', true)
}
this.$refs.input.blur()
}
// If we are starting to show the search box, we should
// focus the input.
if (val === 'search') {
this.reload = false
this.$refs.input.focus()
}
}
@ -166,9 +172,9 @@ export default {
this.scrollable.scrollTop = this.scrollable.scrollHeight
},
(event) => {
this.reload = true
this.ongoing = false
this.scrollable.scrollTop = this.scrollable.scrollHeight
this.$store.commit('setReload', true)
}
)