| Issue 168: | Different behavior for lazy loading a null array for 1.0.3 compared with 0.5.4 | |
| 3 people starred this issue and may be notified of changes. | Back to list |
With the lazy loading, if it returns null array [], there will be an error:
this.ul is null
jquery.dynatree.js Line 233
Our quick fix is:
@@ -227,6 +227,9 @@
if( !cl ){
return;
}
+ if (!this.ui) {
+ return;
+ }
var childLI = this.ul.firstChild;
for(var i=0, l=cl.length-1; i<l; i++) {
var childNode1 = cl[i];
Btw, if it returns null, then the result is like what we expected on 0.5.4, the node is expanded, the node icon has a minus prefix, after click the minus, it will try to load children again. On the 1.0.3, if it loads null array, it seems like the node just become a normal node without any expander sign. I'm not sure this is expected behavior.
This is our quick fix:
@@ -391,7 +394,8 @@
return undefined;
}else if(this.childList.length === 0){
// Loaded, but response was empty
- return false;
+ return undefined;
}else if(this.childList.length === 1 && this.childList[0].isStatusNode()){
// Currently loading or load error
return undefined;
We use Firefox 3.6.13.
Dec 20, 2010
Yes, we can. thanks! Just confirmed the right behavior.
Jan 13, 2011
Issue 170 has been merged into this issue.
Jan 23, 2011
(No comment was entered for this change.)
Labels:
Milestone-Release1.1.0
Jul 17, 2012
considered verified
Jul 17, 2012
(No comment was entered for this change.)
Status:
Verified
|
Owner: moo...@wwwendt.de
Labels: Milestone-Release1.0.4