Closed GoogleCodeExporter closed 9 years ago
By convention, if an JSON respionse contains [] (empty list), that means 'no
child nodes', so the expander will be removed.
undefined or null means 'not tried to load'
Original comment by moo...@wwwendt.de
on 6 Sep 2013 at 5:56
In 'onLazyRead' I add child nodes programmatically, not using ajax. I get an
array with JSON data from some external source and then call 'addChild' method
for each item. If the array is empty, 'addChild' will not be called and the
icon will not disappear.
I updated jsFiddle to demonstrate the simplified version of my code:
http://jsfiddle.net/Ld6aZ/4/
What JSON response do you mean?
Original comment by alkol...@gmail.com
on 6 Sep 2013 at 9:45
In that case you can do this for empty responses:
node.childList = [];
node.render();
With JSON response I meant the Ajax response that is returned by the server, if
you use node.appendAjax(). (This is the most common use case for Dynatree lazy
loading I think)
N.b.
From a usability perspective it might be nicer to avoid marking these nodes as
lazy in the first place. Otherwise every user has to click to find out it's
empty.
Original comment by moo...@wwwendt.de
on 7 Sep 2013 at 8:48
Thank you for the workaround, it works.
Original comment by alkol...@gmail.com
on 25 Sep 2013 at 9:58
Cleanup Scrumboard
Original comment by moo...@wwwendt.de
on 2 May 2014 at 7:47
Original issue reported on code.google.com by
alkol...@gmail.com
on 6 Sep 2013 at 11:45