diff --git a/src/ui_ng/lib/src/tag/tag.component.ts b/src/ui_ng/lib/src/tag/tag.component.ts index 5426931ad..a3aca587d 100644 --- a/src/ui_ng/lib/src/tag/tag.component.ts +++ b/src/ui_ng/lib/src/tag/tag.component.ts @@ -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; diff --git a/src/ui_ng/package.json b/src/ui_ng/package.json index f7cc551fe..36d2c1ec8 100644 --- a/src/ui_ng/package.json +++ b/src/ui_ng/package.json @@ -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",