Question

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.

Was it helpful?

Solution

Try

node.load(true).done(function(){
  node.setExpanded();
});

See also http://www.wwwendt.de/tech/fancytree/doc/jsdoc/FancytreeNode.html

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top