I'm trying to get my Angular Table to refresh after updating the data used in the table.
The docs say "you can trigger an update to the table's rendered rows by calling its renderRows() method." but it is not like a normal child component where I can use something "@ViewChild(MatSort) sort: MatSort;" since I do not import it.
If I do import it and try something like @ViewChild('myTable') myTable: MatTableModule; then I get an error that says that renderRows() does not exist on that type.
How can I call this method? Thanks!
My table code snippet:
<mat-table #table [dataSource]="dataSource" myTable class="dataTable">
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…