From 73d002f5c0131367470310c9dcb878916b1ff1da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=92=D1=8F=D1=87=D0=B5=D1=81=D0=BB=D0=B0=D0=B2=20=D0=94?= =?UTF-8?q?=D0=BE=D1=80=D0=BE=D1=88=D0=B5=D0=BD=D0=BA=D0=BE?= <44668361+SlavaDoroshenko@users.noreply.github.com> Date: Wed, 8 Jul 2026 21:52:46 +0300 Subject: [PATCH] Task/set change detection strategy to OnPush in allocations page (#7274) * Set the change detection strategy to OnPush * Update changelog --- CHANGELOG.md | 1 + .../pages/portfolio/allocations/allocations-page.component.ts | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3f2fc105d..0b0237916 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed - Improved the user account deletion flow in the user settings of the user account page +- Set the change detection strategy to `OnPush` in the allocations page - Set the change detection strategy to `OnPush` in the portfolio holdings page - Set the change detection strategy to `OnPush` in the _FIRE_ page - Set the change detection strategy to `OnPush` in the users section of the admin control panel diff --git a/apps/client/src/app/pages/portfolio/allocations/allocations-page.component.ts b/apps/client/src/app/pages/portfolio/allocations/allocations-page.component.ts index 1ed8bfa66..f1dfed942 100644 --- a/apps/client/src/app/pages/portfolio/allocations/allocations-page.component.ts +++ b/apps/client/src/app/pages/portfolio/allocations/allocations-page.component.ts @@ -22,6 +22,7 @@ import { GfValueComponent } from '@ghostfolio/ui/value'; import { GfWorldMapChartComponent } from '@ghostfolio/ui/world-map-chart'; import { + ChangeDetectionStrategy, ChangeDetectorRef, Component, computed, @@ -48,6 +49,7 @@ import { filter, switchMap, tap } from 'rxjs'; import { AllocationsPageParams } from './interfaces/interfaces'; @Component({ + changeDetection: ChangeDetectionStrategy.OnPush, imports: [ GfPortfolioProportionChartComponent, GfPremiumIndicatorComponent, @@ -161,6 +163,8 @@ export class GfAllocationsPageComponent implements OnInit { .pipe(takeUntilDestroyed(this.destroyRef)) .subscribe((impersonationId) => { this.hasImpersonationId = !!impersonationId; + + this.changeDetectorRef.markForCheck(); }); this.userService.stateChanged