diff --git a/frontend/src/app/components/clipboard/clipboard.component.ts b/frontend/src/app/components/clipboard/clipboard.component.ts index af20dd730..b2febef7c 100644 --- a/frontend/src/app/components/clipboard/clipboard.component.ts +++ b/frontend/src/app/components/clipboard/clipboard.component.ts @@ -1,11 +1,12 @@ -import { Component, OnInit, ViewChild, ElementRef, AfterViewInit, Input } from '@angular/core'; +import { Component, OnInit, ViewChild, ElementRef, AfterViewInit, Input, ChangeDetectionStrategy } from '@angular/core'; import * as ClipboardJS from 'clipboard'; import * as tlite from 'tlite'; @Component({ selector: 'app-clipboard', templateUrl: './clipboard.component.html', - styleUrls: ['./clipboard.component.scss'] + styleUrls: ['./clipboard.component.scss'], + changeDetection: ChangeDetectionStrategy.OnPush, }) export class ClipboardComponent implements AfterViewInit { @ViewChild('btn') btn: ElementRef; diff --git a/frontend/src/app/components/miner/miner.component.ts b/frontend/src/app/components/miner/miner.component.ts index 54a77eff0..a17dd37f6 100644 --- a/frontend/src/app/components/miner/miner.component.ts +++ b/frontend/src/app/components/miner/miner.component.ts @@ -1,4 +1,4 @@ -import { Component, Input, OnChanges } from '@angular/core'; +import { Component, Input, OnChanges, ChangeDetectionStrategy, ChangeDetectorRef } from '@angular/core'; import { AssetsService } from 'src/app/services/assets.service'; import { Transaction } from 'src/app/interfaces/electrs.interface'; @@ -6,6 +6,7 @@ import { Transaction } from 'src/app/interfaces/electrs.interface'; selector: 'app-miner', templateUrl: './miner.component.html', styleUrls: ['./miner.component.scss'], + changeDetection: ChangeDetectionStrategy.OnPush, }) export class MinerComponent implements OnChanges { @Input() coinbaseTransaction: Transaction; @@ -16,6 +17,7 @@ export class MinerComponent implements OnChanges { constructor( private assetsService: AssetsService, + private cd: ChangeDetectorRef, ) { } ngOnChanges() { @@ -56,6 +58,7 @@ export class MinerComponent implements OnChanges { } this.loading = false; + this.cd.markForCheck(); }); }