How can I make the node expand/collapse when the user clicks on the parent node text and not just on the expander triangle?
I tried adding:
nodeClick: function(evt, ui) { $("#myTree").igTree("toggle", ui.node); }
But it gives me the error: "TypeError: node.children is not a function"
Obviously I'm doing something wrong.
Hi Pete,
ui.node refers to a node object which contains the element, data and path of the node. The toggle function takes the element as a parameter so change to:
nodeClick: function(evt, ui) {
$("#myTree").igTree("toggle", ui.node.element);
}
Let me know if you need any additional help!
Do you think, someone could update the documentation to correctly reflect that you need to pass the element instead of the node?
http://help.infragistics.com/jQuery/2012.1/ui.igtree
Hello Pete,
Thank you for contacting Infragistics!
Please let us know if you need further assistance.