🐛 Enable header clicks on tags (#1848)

* enable header clicks

* remove unused func
This commit is contained in:
Mutasem Aldmour 2021-05-31 19:34:55 +03:00 committed by GitHub
parent dd088ebe48
commit 7a5e69d4e5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 7 deletions

View file

@ -6,6 +6,7 @@
v-for="tag in tags" v-for="tag in tags"
:key="tag.id" :key="tag.id"
:class="{clickable: !tag.hidden}" :class="{clickable: !tag.hidden}"
@click="(e) => onClick(e, tag)"
> >
<el-tag <el-tag
:title="tag.title" :title="tag.title"
@ -108,7 +109,9 @@ export default Vue.extend({
} }
}, },
onClick(e: MouseEvent, tag: TagEl) { onClick(e: MouseEvent, tag: TagEl) {
e.stopPropagation(); if (this.clickable) {
e.stopPropagation();
}
// if tag is hidden or not displayed // if tag is hidden or not displayed
if (!tag.hidden) { if (!tag.hidden) {

View file

@ -32,7 +32,7 @@
<template slot-scope="scope"> <template slot-scope="scope">
<div :key="scope.row.id"> <div :key="scope.row.id">
<span class="name">{{scope.row.name}}</span> <span class="name">{{scope.row.name}}</span>
<TagsContainer class="hidden-sm-and-down" :tagIds="getIds(scope.row.tags)" :limit="3" @click="onTagClick" /> <TagsContainer class="hidden-sm-and-down" :tagIds="getIds(scope.row.tags)" :limit="3" />
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
@ -124,11 +124,6 @@ export default mixins(
updateTagsFilter(tags: string[]) { updateTagsFilter(tags: string[]) {
this.filterTagIds = tags; this.filterTagIds = tags;
}, },
onTagClick(tagId: string) {
if (tagId !== 'count' && !this.filterTagIds.includes(tagId)) {
this.filterTagIds.push(tagId);
}
},
async openWorkflow (data: IWorkflowShortResponse, column: any) { // tslint:disable-line:no-any async openWorkflow (data: IWorkflowShortResponse, column: any) { // tslint:disable-line:no-any
if (column.label !== 'Active') { if (column.label !== 'Active') {