AnandanSelvaganesan / angular-d3-tree

D3.js Collapsible Tree Angular Implementation
8 stars 11 forks source link

Update to v6 of d3js #2

Open EddieBenji opened 3 years ago

EddieBenji commented 3 years ago

Hello I tried to run your code but with the newest version of d3 (v6.x). Although it is possible to render the tree, when I click on any node, the tree doesn't collapse at all. No errors are thrown in the console. By any chance, do you know what should be updated in your code?

Thanks. I will keep digging and see if I can update your code, but if you're willing to update it, that would be great!

erikhaddad commented 5 months ago

change the signature of the click function on line 162 of app.component.ts from click = (d) => { to click = (e, d) => { or click = (event: Event, d: any) => { and the click event will be properly handled for expand/collapse