eu81273 / angular.treeview

AngularJS based Treeview (no jQuery)
MIT License
405 stars 223 forks source link

How to collapse folders by default #13

Open mspapant opened 10 years ago

mspapant commented 10 years ago

Is any way to start with all folders collapsed from the start?

Thanks!

quentinburley commented 10 years ago

And secondly, is there a way to have certain folders collapsed from the start and others open? In dynatree this is possibile by setting the 'expand' attribute on the node in the json data. ( http://wwwendt.de/tech/dynatree/doc/dynatree-doc.html#h4.2.1 )

Such a feature would be quite useful.

MarSzo commented 10 years ago

Hi, my fork might help https://github.com/MarSzo/angular.treeview little changes for collapsed by default, additional attribute "expanded" : true in node for expanded specific node at start, see fiddle in readme for example.

quentinburley commented 10 years ago

Very interesting the fork from MarcinSzoldrowski, I note also a useful search feature in that fork.

Third question: how about being able to specify a custom icon image per node. In dynatree this is possibile by setting the 'icon' attribute on the node in the json data. ( http://wwwendt.de/tech/dynatree/doc/dynatree-doc.html#h4.2.1 )

michaelryancaputo commented 10 years ago

@MarcinSzoldrowski Any plans to merge this? Would be really helpful to have it on the main branch, or at least if you added bower support :dancer:

werner commented 10 years ago

I did this setting an attribute called collapsed to true for each node.