Merge pull request #4645 from pengpengshui/fixIssue

Fix issue about label filter #4636
This commit is contained in:
pengpengshui 2018-04-13 11:33:59 +08:00 committed by GitHub
commit 4ab135a7ed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 7 deletions

View File

@ -294,12 +294,11 @@ export class TagComponent implements OnInit, AfterViewInit {
selectedChange(tag?: Tag[]): void {
if (tag && tag[0].labels && tag[0].labels.length) {
this.imageStickLabels.forEach(data => {
data.iconsShow = false;
})
tag[0].labels.forEach((labelInfo: Label) => {
this.imageStickLabels.forEach(data => {
if (labelInfo.id === data['label'].id) {
data.iconsShow = true;
}
});
this.imageStickLabels.find(data => labelInfo.id === data['label'].id).iconsShow = true;
});
}
}
@ -355,6 +354,8 @@ export class TagComponent implements OnInit, AfterViewInit {
this.imageFilterLabels.filter(data => {
if (data.label.name !== labelName) {
data.iconsShow = false;
}else {
data.iconsShow = true;
}
});
@ -380,7 +381,7 @@ export class TagComponent implements OnInit, AfterViewInit {
unFilterLabel(labelInfo: {[key: string]: any | string[]}): void {
this.filterOneLabel = this.initFilter;
labelInfo.iconsShow = false;
// reload datagu
this.currentPage = 1;
let st: State = this.currentState;

View File

@ -30,7 +30,7 @@
"clarity-icons": "0.10.24",
"clarity-ui": "0.10.24",
"core-js": "^2.4.1",
"harbor-ui": "0.6.73",
"harbor-ui": "0.6.74",
"intl": "^1.2.5",
"mutationobserver-shim": "^0.3.2",
"ngx-cookie": "^1.0.0",