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
varapi=$('#addnode-tree').tree().data('tree');letnode1=api.addNode({text: 'New Item 1',id: 'new1'});letnode2=api.addNode({text: 'New Item 2',id: 'new2',parent: 'new1'});console.log("child <a> returned when adding 'new1': ",node1.children('a').get(0))console.log("child <a> returned when adding 'new2': ",node2.children('a').get(0))console.log("<li> returned adding 'new1' equal to <li> returned adding 'new2'?",node1.get(0)===node2.get(0));
Note that the same <a> (node) element is logged twice, i.e. both addNode() calls return the same <li>.
Expected behavior addNode() should return the <li> of the new node regardless of where in the tree it was added.
Version
ids-enterprise: v4.52.0 (Note that while "latest" is said to be 4.52.0 in the docs, it appears to resolve to 4.51.4 in the examples(!))
Describe the bug
tree.addNode()
returns the parent<li>
instead of the added<li>
when using settingnodeData.parent
in the addNode() call.To Reproduce
Steps to reproduce the behavior using attached example:
IDS Enterprise.html
<a>
(node) element is logged twice, i.e. bothaddNode()
calls return the same<li>
.Steps to reproduce the behavior using existing online example:
<a>
(node) element is logged twice, i.e. bothaddNode()
calls return the same<li>
.Expected behavior
addNode()
should return the<li>
of the new node regardless of where in the tree it was added.Version
Screenshots
Screenshot from attached example:
Platform
The text was updated successfully, but these errors were encountered: