Title: append and loadFilter (tree) Post by: catpaw on March 09, 2017, 06:57:50 PM hello
Im using tree with loadFilter: Code: <ul id="t" class="easyui-tree" data-options=" the data shows properly, but when I try to append a child node, the node always apear in the same level of root: Code: var node = $('#t').tree('getSelected'); I think " _parentId " is not been recognized and the node always take no parent as the root node example: -- root (id:1) ---- folder (id:2) <--------- append node "new" ------- file (id:3) should be: -- root (id:1) ---- folder (id:2) ------- file (id:3) ------- new (id:4) instead I get: -- root (id:1) ---- folder (id:2) ------- file (id:3) -- new (id:4) What Im trying to said is that "new" should by child of "folder" not on the same level of "root" In the data base is saved properly and when I reload the tree "new" is in the right place But I dont want/can reload the tree for this particulary case some idea? thanks Title: Re: append and loadFilter (tree) Post by: stworthy on March 10, 2017, 06:40:42 PM When appending a new node to the tree, you should set the 'parent' property to indicate the parent node. Please use this code instead.
Code: var node = $('#tt').tree('getSelected'); Title: Re: append and loadFilter (tree) Post by: catpaw on March 12, 2017, 01:50:19 PM that is correct, thank you
I was trying with node.id instead node.target and was getting error now is properly |