madcapnmckay / Knockout-UI

A home for rich UI components based on KnockoutJS
263 stars 51 forks source link

fixed bug with displaying tree with depth greater than 1 #1

Closed PaulUpson closed 13 years ago

PaulUpson commented 13 years ago

Been using your Tree UI component and noticed that it loses the indent if the node has children.

http://jsfiddle.net/pabloski/K9S36/10/

Coz the call to set child nodes is recursive their parents level wasn't set before their children attempted to set theirs. I've just set the level before setting the children.

http://jsfiddle.net/pabloski/K9S36/11/

p.s. loving your work with these components.

madcapnmckay commented 13 years ago

Good catch. I think I've fixed this before an somehow its ended up in the wrong order again. That's my first ever pull request. :)