1 Reply Latest reply on May 5, 2011 6:44 AM by EvyatarBH

    Drop second item to Tree open folder

    EvyatarBH Level 3

      I'm using a drag&drop Tree based on the nice extension described here -

      http://www.axelscript.com/2008/03/11/using-a-tree-with-drag-and-drop-from-a-grid/

       

      However, there a small issue that I find really annoying -

      I can't drop a second item into an open folder.

       

      First item - OK

      Third Item (and above) - No problem

       

      Second item - Can be dropped only outside the folder and then dragged into it, after being part of the tree.

       

      In addition, this behavior seems to happen only if the folder remained open between drops..

       

      Sounds familiar? Any ideas?

        • 1. Re: Drop second item to Tree open folder
          EvyatarBH Level 3

          I found a workaround -

          Since closing and re-opening the folder eliminates the issue, after adding the item to the data-provider I do as follows -

           

          tree.openItems = [];
          tree.openItems = data.treeOpenItems
          


          (It's part of an item-renderer where I also keep the tree's openItems state in the displayed item data...)

           

          It doesn't change the tree's appearance and it solves the problem.