Skip to content

Commit 8a27bab

Browse files
fix(module:icon): fix @for track function (#8588)
1 parent 7687ff2 commit 8a27bab

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

components/icon/page/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ declare const locale: NzSafeAny;
353353
@for (category of categoryNames; track category; let i = $index) {
354354
<h3>{{ localeObj[category] }}</h3>
355355
<ul class="anticons-list">
356-
@for (icon of displayedNames[i].icons; track trackByFn) {
356+
@for (icon of displayedNames[i].icons; track trackByFn(icon)) {
357357
<li (click)="onIconClick($event, icon)">
358358
<span nz-icon [nzType]="kebabCase(icon)" [nzTheme]="currentTheme"></span>
359359
<span class="anticon-class">
@@ -482,7 +482,7 @@ export class NzPageDemoIconComponent implements OnInit, OnDestroy {
482482
fileList: NzUploadFile[] = [];
483483
icons: Icon[] = [];
484484

485-
trackByFn = (_index: number, item: string): string => `${item}-${this.currentTheme}`;
485+
trackByFn = (item: string): string => `${item}-${this.currentTheme}`;
486486

487487
kebabCase = (str: string): string => kebabCase(str);
488488

0 commit comments

Comments
 (0)