Skip to content

Commit

Permalink
fix(module:icon): fix @for track function (#8588)
Browse files Browse the repository at this point in the history
  • Loading branch information
HyperLife1119 authored Jun 24, 2024
1 parent 7687ff2 commit 8a27bab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions components/icon/page/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ declare const locale: NzSafeAny;
@for (category of categoryNames; track category; let i = $index) {
<h3>{{ localeObj[category] }}</h3>
<ul class="anticons-list">
@for (icon of displayedNames[i].icons; track trackByFn) {
@for (icon of displayedNames[i].icons; track trackByFn(icon)) {
<li (click)="onIconClick($event, icon)">
<span nz-icon [nzType]="kebabCase(icon)" [nzTheme]="currentTheme"></span>
<span class="anticon-class">
Expand Down Expand Up @@ -482,7 +482,7 @@ export class NzPageDemoIconComponent implements OnInit, OnDestroy {
fileList: NzUploadFile[] = [];
icons: Icon[] = [];

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

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

Expand Down

0 comments on commit 8a27bab

Please sign in to comment.