debabratapatra / angular-tree-grid

Angular 10 Tree Grid
https://curiouslinks.com/pages/angular-tree-grid/demo
MIT License
31 stars 17 forks source link

how to rebind the updated data to the angular tree grid. #33

Open medojusrinivas opened 4 years ago

medojusrinivas commented 4 years ago

I am updating the data in some other component and trying to reload the same in angular tree grid.

If I rebuild whole grid array and bind it to the angular tree grid then it is losing the collapse and expand feature. So, if I just update the element and expecting the change in the value then it is not showing in the table. I mean the updated data is not getting updated in the table.

Is there any way where if I can rebind the data again to the angular tree grid

Dobermaxx99 commented 4 years ago

you could try to manually implement local change detection

ex this.changeDetectorRef.detectChanges();

medojusrinivas commented 4 years ago

can you give some example. As it is not working for me.

medojusrinivas commented 4 years ago

Implemented the local change detection in the module but it still did not reflecting in the UI. Actually the objects in the array will be have the updated attribute and that should get reflected in the UI. I tried almost all the ways possible but nothing is reflecting it in the UI. In the console the object in array is updating the attribute value. I got struck on this from so long. If I cannot resolve I think I have look out for the new one. please do the needful...

cascesme commented 3 years ago

@medojusrinivas hello did you find a solution to your problem? If not which other library are you using ? Thank you very much.

medojusrinivas commented 3 years ago

I just kept the same old code but did some tweeks accordingly. But I suggest you look into different one as it is having lot more issues then expected. For now it is working as required but if I get new requirements I don't know what more tweeks I shud make.