Skip to content

Commit

Permalink
Fix tracking function for file info sheet tag services
Browse files Browse the repository at this point in the history
  • Loading branch information
floogulinc committed Mar 26, 2024
1 parent 949ee1a commit 088b9bb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/file-info-sheet/file-info-sheet.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ <h3 class="mat-subheading-2">Tags</h3>
<mat-slide-toggle labelPosition="before" [(ngModel)]="fileInfoSheetService.showStorageTags" [disabled]="!file.storageTags">Edit mode</mat-slide-toggle>
</div>
<mat-accordion multi>
@for (service of (fileInfoSheetService.showStorageTags ? file.storageTags : file.displayTags) | orderBy: 'serviceName' | orderBy: '-serviceType'; track service.serviceKey ?? service.serviceName) {
@for (service of (fileInfoSheetService.showStorageTags ? file.storageTags : file.displayTags) | orderBy: 'serviceName' | orderBy: '-serviceType'; track trackByTagService(service)) {
<mat-expansion-panel >
<mat-expansion-panel-header>
{{service.serviceName}} ({{service.tags.length}})
Expand Down
3 changes: 3 additions & 0 deletions src/app/file-info-sheet/file-info-sheet.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,9 @@ export class FileInfoSheetComponent {
this.reload$.next(null);
}

trackByTagService(item: TagServiceItem) {
return item.serviceKey ?? item.serviceName;
}

navigatorShare = navigator.share;

Expand Down

0 comments on commit 088b9bb

Please sign in to comment.