CirclonGroup / angular-tree-component

A simple yet powerful tree component for Angular (>=2)
https://angular2-tree.readme.io/docs
MIT License
1.09k stars 490 forks source link

Error: trackBy must be a function, but received undefined #206

Closed pixoft-io closed 7 years ago

pixoft-io commented 7 years ago

Hi, i getting this error when upgrading to lastest version 3.1.0 , 2.8.2 works fine for me

image

Thank you

ghybs commented 7 years ago

Hi,

Looks like it fails with angular 2.4.1: https://plnkr.co/edit/crXt0CkBsQmg1Hx6cRiC?p=preview

But with lastest Angular2 (i.e. 2.4.9 as of today), it works: https://plnkr.co/edit/mZTQ9xnikhMwoOvkfiLl?p=preview

Updated from angular2-tree-component@3.1.0 to angular-tree-component@3.2.0: https://plnkr.co/edit/DT3kSE9zom2rdu7ScnYG?p=preview (working test case with angular@2.4.9)

(with dependencies: lodash 4.6.1, mobx 3.1.0 or 3.1.3, ng2-mobx 1.2.9)

Hope this helps.

adamkleingit commented 7 years ago

Fixed in 3.2.1 - please upgrade