Open
Description
When passing options into <highcharts-angular>
via the async
pipe, it mutates the options object.
<highcharts-chart
*ngIf="chartOptions$ | async as chartOptions"
class="chart"
[Highcharts]="Highcharts"
[options]="chartOptions"
[runOutsideAngular]="true"
></highcharts-chart>
chartOptions$
is an observable which takes chartOptions from ngrx
store, but whenever I change data in the store, it mutates the PREVIOUS value stored in the store.
I fixed this by deep cloning the chartOptions before it gets passed into highcharts-cangular
:
JSON.parse(JSON.stringify());
But can we have an official fix?
Here is the StackBlitz to re-produce the problem: