From 60a64b768df7e7c7a0b172aa8d9427e6200d5df8 Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Sun, 11 Jan 2026 16:47:50 +0100 Subject: [PATCH] Bugfix/fix case-insensitive sorting in holdings table component (#6183) * Fix case-insensitive sorting by name * Update changelog --- CHANGELOG.md | 1 + .../src/lib/holdings-table/holdings-table.component.html | 7 +------ libs/ui/src/lib/holdings-table/holdings-table.component.ts | 4 +++- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b23f88eff..5c1fad4db 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fixed the filtering by asset class in the endpoint `GET api/v1/portfolio/holdings` - Fixed the case-insensitive sorting in the accounts table component - Fixed the case-insensitive sorting in the benchmark component +- Fixed the case-insensitive sorting in the holdings table component ## 2.228.0 - 2026-01-03 diff --git a/libs/ui/src/lib/holdings-table/holdings-table.component.html b/libs/ui/src/lib/holdings-table/holdings-table.component.html index d3afe9de9..7c7f6b829 100644 --- a/libs/ui/src/lib/holdings-table/holdings-table.component.html +++ b/libs/ui/src/lib/holdings-table/holdings-table.component.html @@ -19,12 +19,7 @@ - + Name diff --git a/libs/ui/src/lib/holdings-table/holdings-table.component.ts b/libs/ui/src/lib/holdings-table/holdings-table.component.ts index 1c46e18db..f408f7d9b 100644 --- a/libs/ui/src/lib/holdings-table/holdings-table.component.ts +++ b/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) {