From a34e84614c4b6c50df4188ddb5335487575fa578 Mon Sep 17 00:00:00 2001 From: Vyacheslav Date: Wed, 8 Jul 2026 00:53:06 +0300 Subject: [PATCH] Set the change detection strategy to OnPush in the analysis page --- CHANGELOG.md | 1 + .../app/pages/portfolio/analysis/analysis-page.component.ts | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6c6137890..aca76512f 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 analysis 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/analysis/analysis-page.component.ts b/apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts index 6c49a9030..f9c618596 100644 --- a/apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts +++ b/apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts @@ -25,6 +25,7 @@ import { GfValueComponent } from '@ghostfolio/ui/value'; import { Clipboard } from '@angular/cdk/clipboard'; import { + ChangeDetectionStrategy, ChangeDetectorRef, Component, computed, @@ -51,6 +52,7 @@ import { DeviceDetectorService } from 'ngx-device-detector'; import { NgxSkeletonLoaderModule } from 'ngx-skeleton-loader'; @Component({ + changeDetection: ChangeDetectionStrategy.OnPush, imports: [ GfBenchmarkComparatorComponent, GfInvestmentChartComponent, @@ -148,6 +150,8 @@ export class GfAnalysisPageComponent implements OnInit { .pipe(takeUntilDestroyed(this.destroyRef)) .subscribe((impersonationId) => { this.hasImpersonationId = !!impersonationId; + + this.changeDetectorRef.markForCheck(); }); this.userService.stateChanged @@ -229,6 +233,8 @@ export class GfAnalysisPageComponent implements OnInit { } else if (mode === 'portfolio') { this.isLoadingPortfolioPrompt = false; } + + this.changeDetectorRef.markForCheck(); }); }