mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-22 18:25:56 +01:00
Fix issue about label filter #4636
This commit is contained in:
parent
946b4b4ad8
commit
9ebe8d64da
@ -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;
|
||||
|
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user