Skip to content

Commit

Permalink
Merge pull request #2431 from nextcloud/fix/noid/global-search
Browse files Browse the repository at this point in the history
fix: allow to clear global search in filter menu
  • Loading branch information
raimund-schluessler authored Jan 1, 2024
2 parents bca0e7f + 2bb6734 commit 9028ae6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/components/FilterDropdown.vue
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,15 @@ export default {
...mapGetters({
tags: 'tags',
filter: 'filter',
searchQuery: 'searchQuery',
}),
isFilterActive() {
return this.filter.tags.length
return this.filter.tags.length || this.searchQuery
},
},
methods: {
t,
...mapMutations(['setFilter']),
...mapMutations(['setFilter', 'setSearchQuery']),

setTags(tags) {
const filter = this.filter
Expand All @@ -99,6 +100,7 @@ export default {

resetFilter() {
this.setFilter({ tags: [] })
this.setSearchQuery('')
},
},
}
Expand Down

0 comments on commit 9028ae6

Please sign in to comment.