Skip to content

Commit

Permalink
Close filter presets when selecting or deleting a filter
Browse files Browse the repository at this point in the history
  • Loading branch information
Fajfa committed Oct 15, 2024
1 parent fc3d64d commit c3cec6b
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@

<b-dropdown
v-if="filterPresets.length"
ref="filterPresets"
variant="light"
size="lg"
menu-class="shadow-sm"
Expand Down Expand Up @@ -1793,6 +1794,10 @@ export default {
removeStorageRecordListFilterPreset (name) {
this.customPresetFilters = this.customPresetFilters.filter(f => f.name !== name)
if (this.$refs.filterPresets) {
this.$refs.filterPresets.hide(true)
}
try {
setItem(`record-list-preset-${this.uniqueID}`, this.customPresetFilters)
} catch (e) {
Expand Down Expand Up @@ -1914,6 +1919,10 @@ export default {
this.recordListFilter = this.recordListFilter.concat(filter)
this.activeFilters.push(name)
this.refresh(true)
if (this.$refs.filterPresets) {
this.$refs.filterPresets.hide(true)
}
},
removeFilter (filterIndex) {
Expand Down

0 comments on commit c3cec6b

Please sign in to comment.