mirror of
https://github.com/Kareadita/Kavita.git
synced 2026-02-24 04:00:04 -05:00
Manually pre sort - Fixes #4365
This commit is contained in:
parent
77486350ef
commit
998df2bb29
@ -13,7 +13,6 @@
|
||||
[columnMode]="'force'"
|
||||
rowHeight="auto"
|
||||
[footerHeight]="50"
|
||||
[sorts]="[{prop: 'totalFiles', dir: 'desc'}]"
|
||||
>
|
||||
<ngx-datatable-column prop="extension" [sortable]="true" [draggable]="false" [resizeable]="false">
|
||||
<ng-template ngx-datatable-header-template>
|
||||
|
||||
@ -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();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user