mar10 / dynatree

Automatically exported from code.google.com/p/dynatree
93 stars 37 forks source link

Async loading with onLazyRead does not correctly trigger events such that reloadChildren does not work correctly. #449

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.  Use an asynchronous onLazyRead function.  
2.  Call reloadChildren with a callback specified. 
3.  Never receive the callback. 

Dynatree version 1.2.4
Mac OsX operating system. 
HTML document type. 

I've attached a patch that fixes it in dynatree, but there are other ways to 
fix it as well.  The author suggested that these fixes could just be applied to 
the non-dynatree source file, and that works too.  To do that, add the 
following to the end of your onLazyLoad method: 

   node.setLazyNodeStatus(DTNodeStatus_Ok);             
   var event = "nodeLoaded.dynatree." + node.tree.$tree.attr("id") + "." + node.data.key;
   node.tree.$tree.trigger(event, [node, true]);

Original issue reported on code.google.com by billst...@gmail.com on 31 Jul 2013 at 10:01

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks for reporting this.
This is also already be solved for the successor 'Fancytree' (needs testing 
though)

Original comment by moo...@wwwendt.de on 31 Jul 2013 at 10:10

GoogleCodeExporter commented 9 years ago
As of 2014 Dynatree is feature frozen.
Please have a look at Fancytree (sequel of DynaTree 1.x): chances are good that 
the problem was resolved / the requested featuer is already implemented.
Please open a new issue there otherwise:

https://github.com/mar10/fancytree

Original comment by moo...@wwwendt.de on 1 May 2014 at 4:38