frappe / datatable

The Missing Javascript Datatable for the Web
https://frappe.io/datatable
MIT License
1.02k stars 164 forks source link

Allow opening tree view collapsed #58

Open steventebrinke opened 5 years ago

steventebrinke commented 5 years ago

The tree view is a nice feature of datatable, I really like it. However, I'd like to open the tree collapsed by default. (I have a large tree, so it's nicer to expand only the parts that you want to look into.) So it would be nice to have a config option that states whether the tree should initially be expanded or collapsed. (You could even make it more advanced by stating up to what level the tree should be expanded, but for my use case just a boolean would be fine.)

juanpablocerdarodriguez commented 5 years ago

you can achieve that with

(your datatable object var).rowmanager.collapseAllNodes()