2016-12-24

Hey !

I'm using "primeng": "^1.1.2", datatable component with lazy loading and this is my issue: when datatable is drawn the first time, it renders everything correctly - from binded value([value]="brands") of an empty array:

Code:

brands: Brand[] = [];

to new value through api-call service like this

Code:

this.brands = <Brand[]> res.data;

The problem comes with the second redraw - when I change the binded value this.brands manually, it simply doesn't change on the output (unless I do something drastic with it like this.brands = []; - and yes, I have tried to do this.brands = []; and right after it assign the value from API this.brands = <Brand[]> res.data; but it still didn't help)

I noticed that this problem occured once I updated to the newest angular-cli beta.24 and to the newest version of the angular2 - angular 2.4.1.

Everything else in my project runs correctly (reactivity is working, I created a component variable, was incrementing it's value with button and it was also incrementing on the output).

Any idea what might be the problem? Is there any way to trigger the change manually and hence redraw the table contents? I don't really want to go back to the older angular2 version.

Statistics: Posted by Lukass445 — 25 Dec 2016, 00:04

Show more