Reputation: 804
I'm starting with jstree plugin, and I'm having a problem with it.
I don't know why, but nodes are always shown, even if I collapse them.
When tree is loaded, nodes are closed and the tree looks like this:
I open the first node, and tree looks like this:
And, when I close(collapse) the previous opened node, it looks like this one (parent node seems closed, but its children are visible):
jsTree version is pre1.0 stable (downloaded from here)
The JSON data I generate with my app are:
[
{ "data" : "Parent ...",
"state" : "closed",
"attr" : {
"id": "parentID",
"rel": "line",
"class": "jstree-unchecked"
},
"children": [
{ "data" : "proposal1 . . .",
"state" : "closed",
"attr" : {
"id": "prop1",
"rel": "proposal",
"class": "jstree-checked jstree-leaf"
}
},
{ "data" : "proposal2 . . .",
"state" : "closed",
"attr" : {
"id": "prop2",
"rel": "proposal",
"class": "jstree-unchecked jstree-leaf"
}
}
]
}]
Finally, jsTree script section to create the tree is:
$("#propuestas").jstree({
"json_data" : {
"data" :vewJson,
"progressive_render" : true
}
,
"ui" : {
"select_limit" : -1,
"real_checkboxes" : true
},
"plugins" : [ "themes", "json_data","checkbox", "ui"]
});
Why are parent node opened? Why are the children/leaf nodes visible?
Any help is very very appreciated. I'm so stuck with this.
Thanks in advance.
Upvotes: 0
Views: 2053
Reputation: 322
There is a similar post/fix here: display flaw for IE8/9. It looks like it's a doctype issue.
Upvotes: 2