I have a Tree component and need to access some nodes by its
index. This is to make a "move up/down" control. My idea, after
trying many, is to duplicate the selected (current) node up or
down, then replace the content of the original with the previous
I wish not to use previousSibling or nextSibling since, as it
seems, it doesn't recognizes either the origin and destination
nodes are in the same hierarchical level.
Working with some
index function doesn't works as I would expect when in 2nd
level nodes (that is, some child nodes of the first nodes) ; for
if the selected node is the second child of the second node,
index = 4, and then I substract this number to get the (supposedly)
previous child,, that is, in index 3, then I get the node in index
5.... my thought is that, when closed, the node in index 5 was
actually index 3.
Any clarification on how this could be happening is greatly
To remove un item from a Tree component, you need to specify
the node level where the selected node should be deleted.
Hope this will help someone else.