diff --git a/CHANGELOG.md b/CHANGELOG.md index a4989f0cd1..01202969ae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed - Improved the holdings table of the home overview by adding the sorting by name and performance +- Changed the default sorting of the holdings table to the performance in descending order - Improved the usability of the activities page by eliminating the reload on canceling the import activities dialog - Improved the accessibility of the _Buy me a coffee_ button on the about page - Improved the accessibility of the entity logo component 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 5d586d8911..efd6f38763 100644 --- a/libs/ui/src/lib/holdings-table/holdings-table.component.html +++ b/libs/ui/src/lib/holdings-table/holdings-table.component.html @@ -5,8 +5,8 @@ matSort [class.simple]="mode() === 'simple'" [dataSource]="dataSource" - [matSortActive]="sortActive()" - [matSortDirection]="sortDirection()" + [matSortActive]="sortActive" + [matSortDirection]="sortDirection" > 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 3181cc1347..70ce2cb1e9 100644 --- a/libs/ui/src/lib/holdings-table/holdings-table.component.ts +++ b/libs/ui/src/lib/holdings-table/holdings-table.component.ts @@ -101,15 +101,8 @@ export class GfHoldingsTableComponent { return !this.holdings(); }); - protected readonly sortActive = computed(() => { - return this.mode() === 'default' - ? 'allocationInPercentage' - : 'assetProfile.name'; - }); - - protected readonly sortDirection = computed(() => { - return this.mode() === 'default' ? 'desc' : 'asc'; - }); + protected readonly sortActive = 'netPerformancePercentWithCurrencyEffect'; + protected readonly sortDirection: SortDirection = 'desc'; public constructor() { this.dataSource.sortingDataAccessor = (holding, path) => {