You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I use json data for jsTree with children but without parent, like this:
{
id : "string"// will be autogenerated if omitted
text : "string"// node text
icon : "string"// string for custom
state : {
opened : boolean// is the node open
disabled : boolean// is the node disabled
selected : boolean// is the node selected},
children : []// array of strings or objects
li_attr : {}// attributes for the generated LI node
a_attr : {}// attributes for the generated A node}// note there is no parent property in this json
-- then pushing to ngJsTree's model doesn't rerender jsTree view. Incrementing version will do the trick, but I don't want to rerender whole tree if only one node is added.
I noticed that you use following code to add to the jsTree's model newly pushed node:
-- so if node doesn't have parent property (as in my case) node wont' be added/
Using both children and parent at the same time is impossible (https://www.jstree.com/docs/json/) as jstree prefers parent and ignores children as far as I understand.
The text was updated successfully, but these errors were encountered:
Yes, because in the other syntax (the parent one), all are first level.
From what i saw, there is not create_node function in the jsTree that doesn't require parent node. Looks like to support this data format i will need to change many things, not sure i will have time soon. Sorry, you are welcome to fork and pr :)
Hi!
When I use json data for jsTree with children but without parent, like this:
-- then pushing to ngJsTree's model doesn't rerender jsTree view. Incrementing version will do the trick, but I don't want to rerender whole tree if only one node is added.
I noticed that you use following code to add to the jsTree's model newly pushed node:
-- so if node doesn't have parent property (as in my case) node wont' be added/
Using both children and parent at the same time is impossible (https://www.jstree.com/docs/json/) as jstree prefers parent and ignores children as far as I understand.
The text was updated successfully, but these errors were encountered: