webanimals / dynatree

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

JSON "expand" attributes does not trigger onLazyRead #413

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Version 1.2.4 of dynatree
2. Windows
3. Chrome Browser / HTML5

When we use initAjax to initially load the tree we set the "expand" attribute 
for some parent nodes if we have default selections when the tree loads.  This 
does not trigger the onLazyRead event for those expanded nodes.  Should it?  
Because what happens is only the single child is displayed and not its siblings 
because the parents children have not been fully loaded with onLazyRead.

Original issue reported on code.google.com by bjohnson...@gmail.com on 26 Mar 2013 at 9:10

GoogleCodeExporter commented 9 years ago
We also set "isLazy" to true for the parent node but this does not seem to help.

Original comment by bjohnson...@gmail.com on 26 Mar 2013 at 9:12

GoogleCodeExporter commented 9 years ago
this is currently by design.
If you want a delayed lazy loading of sub nodes, you would have to call 
node.expand() in the in the postinit event.

Original comment by moo...@wwwendt.de on 31 Mar 2013 at 4:59

GoogleCodeExporter commented 9 years ago
You mentioned this is by design.  Is there a specific reason as I do not see 
how this is a good thing.  Especially if we set the "isLazy" attribute.  If the 
incoming JSON has both "expand" and "isLazy" is there any reason why this 
should not trigger a lazy read?

Original comment by bjohnson...@gmail.com on 1 Apr 2013 at 4:40

GoogleCodeExporter commented 9 years ago
I did not mean that it is a bad thing, just that it's not implemented at the 
moment.
The current workaround would be to implement it in one of the callbacks.
(Yet note that there are currently some problems reported with too many 
parallel lazy-expands at the same time.)

Fancytree will probably have something like this built-in (and should also 
allow auto loading lazy nodes without the need to expand them)

Original comment by moo...@wwwendt.de on 9 Apr 2013 at 8:50

GoogleCodeExporter commented 9 years ago

Original comment by moo...@wwwendt.de on 8 Sep 2013 at 6:03