Find and share HowTos to various installations / configurations!
4 posts • Page 1 of 1
4 posts
• Page 1 of 1
AGorbatykh
Posts:59
Joined: Thu Dec 17, 2015 1:01 pm
How to move items into folder?
Postby AGorbatykh »
I'm using Tree-widget and can't find simple way to move folder (with subitems) into another folder. Is there an easy way to solve it?
I used .moveItem()-function but it's work a little wrong for me, because it moves after folder (not into).
Hmmm ... it seems there is no easy way right now except when you know that the target folder node has already a child,
since then you can pass this child inside the target folder as the "after" item, e.g.
TREE.moveItem("folder2", "item1");
(as a workaround you can temporarily create a child node in the target folder if it would be empty otherwise and remove
this dummy child node after the move)