Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

184
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda