Skip to content

Commit

Permalink
Fixed search issue: Clear value when route changes
Browse files Browse the repository at this point in the history
Fixed filter shoots issue: Do not filter user errors when not on all shoots list
  • Loading branch information
grolu committed May 29, 2018
1 parent d5a625b commit 38bdd7a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions frontend/src/pages/ShootList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,14 @@ limitations under the License.
const predicate = item => item.value === 'project'
const projectHeader = find(this.allHeaders, predicate)
projectHeader.hidden = this.projectScope
},
beforeRouteUpdate (to, from, next) {
this.search = null
next()
},
beforeRouteLeave (to, from, next) {
this.search = null
next()
}
}
</script>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/store/modules/shoots.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ const getters = {
}
items = filter(items, predicate)
}
if (state.hideUserIssues && rootState.onlyShootsWithIssues) {
if (state.hideUserIssues && rootState.namespace === '_all' && rootState.onlyShootsWithIssues) {
const predicate = item => {
return !isUserError(get(item, 'status.lastError.codes', []))
}
Expand Down

0 comments on commit 38bdd7a

Please sign in to comment.