mirror of
https://github.com/mempool/mempool.git
synced 2024-12-30 18:24:25 +01:00
Merge pull request #1313 from nymkappa/bugfix/pie-chart-click-fix
Fix broken navigation when clicking on pie chart
This commit is contained in:
commit
5a373f6518
@ -1,4 +1,4 @@
|
|||||||
import { ChangeDetectionStrategy, Component, Input, OnInit } from '@angular/core';
|
import { ChangeDetectionStrategy, Component, Input, NgZone, OnInit } from '@angular/core';
|
||||||
import { FormBuilder, FormGroup } from '@angular/forms';
|
import { FormBuilder, FormGroup } from '@angular/forms';
|
||||||
import { Router } from '@angular/router';
|
import { Router } from '@angular/router';
|
||||||
import { EChartsOption, PieSeriesOption } from 'echarts';
|
import { EChartsOption, PieSeriesOption } from 'echarts';
|
||||||
@ -41,6 +41,7 @@ export class PoolRankingComponent implements OnInit {
|
|||||||
private miningService: MiningService,
|
private miningService: MiningService,
|
||||||
private seoService: SeoService,
|
private seoService: SeoService,
|
||||||
private router: Router,
|
private router: Router,
|
||||||
|
private zone: NgZone,
|
||||||
) {
|
) {
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -293,8 +294,10 @@ export class PoolRankingComponent implements OnInit {
|
|||||||
if (e.data.data === 9999) { // "Other"
|
if (e.data.data === 9999) { // "Other"
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
this.zone.run(() => {
|
||||||
this.router.navigate(['/mining/pool/', e.data.data]);
|
this.router.navigate(['/mining/pool/', e.data.data]);
|
||||||
});
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user