Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

188
Views
FancyTree DnD how to allow only drop into valid folders and not outside of parent

I have a fancytree table which has A Main Folder A Child and a child of a child. below is what I would like to achieve

 Static(Folder) -> Not Droppable
   | 
   Cycles(Folder) -> Not Droppable
    |
    [0] -> (folder) -> Able to drop into
    ----------------------- Cannot Drop Nodes Here
    [1] -> (folder) -> Able to drop into
    ----------------------- Cannot Drop Nodes Here
    [2] -> (folder) -> Able to drop into

My current code sorta works, but I had to set a custom flag for the nodes called "droppable" and if its false then don't allow dragging into it. You can't drop into the folder itself, but if its expanded you're still able to drag into the folder at any position. I only want to allow the node to go into the folders that are valid.


dragEnter: function(node, data) {
                      
     if (node.data.droppable == false) {
         return false;
      }
        
      return true;
 },

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!