Reputation: 95
I'm working with fancytree.
How can open a node (lazy) after it was reload in javascript?
Code:
node.load(forceReload = true);
node.setExpanded();
When execute node.setExpanded() I get "Assertion failed" error. I think that the problem is executing the setExpanded() instruction before that node.load() is executing.
Thank you.
Upvotes: 4
Views: 5543
Reputation: 14814
Try
node.load(true).done(function(){
node.setExpanded();
});
See also http://www.wwwendt.de/tech/fancytree/doc/jsdoc/FancytreeNode.html
Upvotes: 5