Browse Source

Fix case-insensitive sorting by name

pull/6183/head
Thomas Kaul 1 day ago
parent
commit
055f2a4c1f
  1. 7
      libs/ui/src/lib/holdings-table/holdings-table.component.html
  2. 4
      libs/ui/src/lib/holdings-table/holdings-table.component.ts

7
libs/ui/src/lib/holdings-table/holdings-table.component.html

@ -19,12 +19,7 @@
</ng-container>
<ng-container matColumnDef="nameWithSymbol">
<th
*matHeaderCellDef
class="px-1"
mat-header-cell
mat-sort-header="symbol"
>
<th *matHeaderCellDef class="px-1" mat-header-cell mat-sort-header="name">
<ng-container i18n>Name</ng-container>
</th>
<td *matCellDef="let element" class="line-height-1 px-1" mat-cell>

4
libs/ui/src/lib/holdings-table/holdings-table.component.ts

@ -1,4 +1,4 @@
import { getLocale } from '@ghostfolio/common/helper';
import { getLocale, getLowercase } from '@ghostfolio/common/helper';
import {
AssetProfileIdentifier,
PortfolioPosition
@ -92,6 +92,8 @@ export class GfHoldingsTableComponent implements OnChanges, OnDestroy {
this.dataSource = new MatTableDataSource(this.holdings);
this.dataSource.paginator = this.paginator;
this.dataSource.sortingDataAccessor = getLowercase;
this.dataSource.sort = this.sort;
if (this.holdings) {

Loading…
Cancel
Save