Enable tags selection (#1960)

This commit is contained in:
Mutasem Aldmour 2021-07-01 10:15:28 +02:00 committed by GitHub
parent 1e551a202f
commit a42bbf88f8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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" /> <TagsContainer class="hidden-sm-and-down" :tagIds="getIds(scope.row.tags)" :limit="3" @click="onTagClick" :clickable="true" :hoverable="true" />
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
@ -124,6 +124,11 @@ 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') {