Having trouble asynchronously adding rows using the @angular/material:table
schematic. Despite calling this.table.renderRows()
, the new rows are not displayed correctly. The "works" part is added to the table, reflecting in the paginator, but the asynchronous addition of "doesn't work" only increases the row count on the paginator without visibly adding a new row.
I'm sure I'm not the only one facing this issue, so it must be my approach that's incorrect. What is the right way to achieve this?
Steps to reproduce:
- Initialize Project
ng new stackoverflow1; cd stackoverflow1
- Add angular material
ng add @angular/material
- Add schematic
ng generate @angular/material:table table
- Include
in<app-table></app-table>
src/app/app.component.html
- Add
src/app/table/table.component.ts
6. Serve the app withng serve -o
OS: Ubuntu 20.04 on WSL2 Windows 10 version 2004 Browser: Firefox 82.0.2, Chrome 86.0.4240.183 Angular CLI: 10.2.0 Node: 10.19.0