ngx-easy-table icon indicating copy to clipboard operation
ngx-easy-table copied to clipboard

Table not updating when in dynamic loaded component

Open anuj509 opened this issue 2 years ago • 1 comments

Hi, I have a dynamic loaded component which contains table. when I update the data, table is not updating. Kindly suggest some fix.

anuj509 avatar Apr 03 '22 05:04 anuj509

also sometimes when we update the data variable it does not reflect in table.

anuj509 avatar Jul 22 '22 13:07 anuj509

Have you tried something like: this.data = [... this.data]?

MatheusOliveira-dev avatar Nov 30 '22 22:11 MatheusOliveira-dev

Have you tried something like: this.data = [... this.data]?

Yes I have tried this way as well

anuj509 avatar Dec 01 '22 11:12 anuj509

@anuj509 Without an example I can't help much, but I found one issue. When you use ngIf:

<ngx-table [configuration]="configuration" #table [data]="data" [columns]="columns" *ngIf="something"></ngx-table>

Please try to set static to false:

@ViewChild('table', { static: false }) table: APIDefinition;

I've fixed demo page, because it was causing an error indeed.

If this is not a fix for you, please create a new issue with some code. I'll help.

ssuperczynski avatar Dec 14 '22 15:12 ssuperczynski