From 165283a8ce9381f5490fd8d6dd94f5cfdd3a90b1 Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Sun, 6 Sep 2026 10:01:04 +0200 Subject: [PATCH] Add simplified mode to holdings table component --- .../lib/holdings-table/holdings-table.component.html | 4 ++-- .../holdings-table/holdings-table.component.stories.ts | 2 +- .../src/lib/holdings-table/holdings-table.component.ts | 10 ++++++---- 3 files changed, 9 insertions(+), 7 deletions(-) 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 e96c7bef0..2ed948478 100644 --- a/libs/ui/src/lib/holdings-table/holdings-table.component.html +++ b/libs/ui/src/lib/holdings-table/holdings-table.component.html @@ -34,7 +34,7 @@ ({{ element.assetProfile.assetSubClassLabel }}) } - @if (!isSimplified()) { + @if (mode() === 'default') {
{{ element.assetProfile.symbol }}
@@ -186,7 +186,7 @@ (); - public readonly isSimplified = input(false); public readonly locale = input(getLocale()); + public readonly mode = input<'default' | 'simple'>('default'); public readonly pageSize = model(Number.MAX_SAFE_INTEGER); public readonly holdingClicked = output(); @@ -63,7 +63,7 @@ export class GfHoldingsTableComponent { protected readonly dataSource = new MatTableDataSource([]); protected readonly displayedColumns = computed(() => { - if (this.isSimplified()) { + if (this.mode() === 'simple') { return ['icon', 'nameWithSymbol', 'performanceInPercentage']; } @@ -92,11 +92,13 @@ export class GfHoldingsTableComponent { }); protected readonly sortActive = computed(() => { - return this.isSimplified() ? 'assetProfile.name' : 'allocationInPercentage'; + return this.mode() === 'default' + ? 'allocationInPercentage' + : 'assetProfile.name'; }); protected readonly sortDirection = computed(() => { - return this.isSimplified() ? 'asc' : 'desc'; + return this.mode() === 'default' ? 'desc' : 'asc'; }); public constructor() {