hummingbird-treeview icon indicating copy to clipboard operation
hummingbird-treeview copied to clipboard

initialize expand tree

Open CharleysTante opened this issue 6 years ago • 1 comments

First thanks for your great script :-) But if I want to initialize a pseudo HTML with "expandAll", it dosen't work in the right way. I'll get a tree but it is not possible to collapse or expand it via mouse click. Also the checkboxes doesn't work in this case for sub checknoxes, independently which browser I use.

The only workaround I found was, first to initialize the tree without any parameter and after that to use "expandAll", but I think that's not the best way ;-)

$("#treeview").hummingbird(); $("#treeview").hummingbird("expandAll");

CharleysTante avatar Aug 13 '18 13:08 CharleysTante

Hi, Thanks for using the hummingbird-treeview. You are absolutely right, initialization with "expandAll" is not possible and your workaround is a solution. However, there is a better way to do it via an option. Before initialization ($("#treeview").hummingbird();) use this: $.fn.hummingbird.defaults.collapseAll= false; Check the README for more options: https://github.com/hummingbird-dev/hummingbird-treeview#options

hummingbird-dev avatar Aug 29 '18 08:08 hummingbird-dev