Browse Source

Task/set change detection strategy to OnPush in portfolio page (#7241)

* Set change detection strategy to OnPush

* Update changelog
pull/7239/head
ylink 2 weeks ago
committed by GitHub
parent
commit
6f2db3e649
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 1
      CHANGELOG.md
  2. 12
      apps/client/src/app/pages/portfolio/portfolio-page.component.ts

1
CHANGELOG.md

@ -17,6 +17,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Set the change detection strategy to `OnPush` in the confirmation dialog component
- Set the change detection strategy to `OnPush` in the prompt dialog component
- Set the change detection strategy to `OnPush` in the overview of the admin control panel
- Set the change detection strategy to `OnPush` in the portfolio page
- Upgraded `envalid` from version `8.1.1` to `8.2.0`
- Upgraded `stripe` from version `21.0.1` to `22.2.3`

12
apps/client/src/app/pages/portfolio/portfolio-page.component.ts

@ -6,7 +6,12 @@ import {
TabConfiguration
} from '@ghostfolio/ui/page-tabs';
import { ChangeDetectorRef, Component, DestroyRef } from '@angular/core';
import {
ChangeDetectionStrategy,
ChangeDetectorRef,
Component,
DestroyRef
} from '@angular/core';
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
import { addIcons } from 'ionicons';
import {
@ -18,6 +23,7 @@ import {
} from 'ionicons/icons';
@Component({
changeDetection: ChangeDetectionStrategy.OnPush,
host: { class: 'page' },
imports: [GfPageTabsComponent],
selector: 'gf-portfolio-page',
@ -67,9 +73,9 @@ export class PortfolioPageComponent {
}
];
this.user = state.user;
this.changeDetectorRef.markForCheck();
}
this.changeDetectorRef.markForCheck();
});
addIcons({

Loading…
Cancel
Save