angular - Highchart graphs embedded in ngfor table disappear when a row filter is applied
问题描述
I have a table which outputs 20 rows of stock symbols and a corresponding highchart graph for each stock. When I apply a filter to search for a specific stock symbol the highchart graph for that row is preserved, but all the rest are gone. Is there anyway to preserve all the highchart graphs when I remove the filter and the full list is displayed again?
<input type="text" [(ngModel)]="query">
<ng-container *ngFor='let stock of (Stocks | fullTextSearch:query:"tickerSymbol") ; let i = index; let p = index' >
<tr>
<td>{{ stock.tickerSymbol }}</td>
<td>
<div *ngIf= 'i == p'>
<div id="graph-small">
<ng-container>
<div id="containerC{{p}}"></div>
</ng-container>
</div>
</div>
</td>
</tr>
</ng-container>
解决方案
推荐阅读
- caching - smarty tpl 文件被缓存,更新也不可能
- c# - 我在这个方法c#中返回什么
- c++ - 字符数组初始化和尾随 null
- postgresql - PostgreSQL 没有在 UPDATE 语句上使用正确的分区
- javascript - 有没有一个函数可以改变 JS 中的参数给定的全局变量?
- sass - 如何使用mixin从scss中未定义长度的数组创建字符串?
- php - ReactJS 生产构建不包括文件
- batch-file - 如何根据不同文件中的文本重命名文件行?
- javascript - 存储json还是js对象效率更高
- scala - Intellij Idea - 如何在 INSIDE IDE 中获得并行 scalatest 执行