Merge pull request #2244 from nextcloud/enh/filter-on-label-click
Toggle filter on clicking card labels
This commit is contained in:
@@ -57,7 +57,7 @@
|
||||
class="labels"
|
||||
@click="openCard">
|
||||
<li v-for="label in card.labels" :key="label.id" :style="labelStyle(label)">
|
||||
<span>{{ label.title }}</span>
|
||||
<span @click="applyLabelFilter(label)">{{ label.title }}</span>
|
||||
</li>
|
||||
</transition-group>
|
||||
<div v-show="!compactMode" class="card-controls compact-item" @click="openCard">
|
||||
@@ -142,6 +142,9 @@ export default {
|
||||
cancelEdit() {
|
||||
this.editing = false
|
||||
},
|
||||
applyLabelFilter(label) {
|
||||
this.$nextTick(() => this.$store.dispatch('toggleFilter', { tags: [label.id] }))
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user