diff --git a/UI/Web/src/app/statistics/_components/file-breakdown-stats/file-breakdown-stats.component.html b/UI/Web/src/app/statistics/_components/file-breakdown-stats/file-breakdown-stats.component.html index 9446a81c4..23d07b654 100644 --- a/UI/Web/src/app/statistics/_components/file-breakdown-stats/file-breakdown-stats.component.html +++ b/UI/Web/src/app/statistics/_components/file-breakdown-stats/file-breakdown-stats.component.html @@ -13,7 +13,6 @@ [columnMode]="'force'" rowHeight="auto" [footerHeight]="50" - [sorts]="[{prop: 'totalFiles', dir: 'desc'}]" > diff --git a/UI/Web/src/app/statistics/_components/file-breakdown-stats/file-breakdown-stats.component.ts b/UI/Web/src/app/statistics/_components/file-breakdown-stats/file-breakdown-stats.component.ts index f0b517a36..b91a97945 100644 --- a/UI/Web/src/app/statistics/_components/file-breakdown-stats/file-breakdown-stats.component.ts +++ b/UI/Web/src/app/statistics/_components/file-breakdown-stats/file-breakdown-stats.component.ts @@ -37,7 +37,8 @@ export class FileBreakdownStatsComponent implements OnInit { ngOnInit() { this.statService.getFileBreakdown().pipe( tap(res => { - this.files.set(res.fileBreakdown); + // Using sort props breaks the table for some users; https://github.com/Kareadita/Kavita/issues/4365 + this.files.set(res.fileBreakdown.sort((a, b) => b.totalFiles - a.totalFiles)); this.totalSize.set(res.totalFileSize); }) ).subscribe();