GithubHelp home page GithubHelp logo

Nesting of Nodes DOES NOT WORK about dnd-kit HOT 2 CLOSED

pachu4u avatar pachu4u commented on July 26, 2024
Nesting of Nodes DOES NOT WORK

from dnd-kit.

Comments (2)

clauderic avatar clauderic commented on July 26, 2024

I don't really understand your use-case well, but from what I understand, these are all issues related to not using the library correctly:

Nodes do not drag smoothly - They flicker when we drag

This is because you added a transition on your nodes for transform:

.node {
  transition: transform 250ms ease;
}

The node 1 goes under node 2 when dragged over. Both have same z-index. Node 2 goes over node 1 correctly

The library does manage z-index for you, it's up to the consumer to manage z-index properly.

The over property is null when node 2 is dropped over node 1. This is critical information to establish parent child relationship for nesting.
isOver from both Draggable and Droppable is not working as expected. They are false even when the node is dragged over.

This is because you are rendering all of the contents of your Background component within a nested <DndContext> provider, so when you are dragging a Node component there are no other droppable areas within the context provider where those nodes are rendered, which explains why over is null.

from dnd-kit.

pachu4u avatar pachu4u commented on July 26, 2024

Hi @clauderic ,

It does not work even if I remove the nested dnd-context. Over is still null.

When I drop it, over is null. After dropping node 2 in node 1, if I just click on the handle without moving it. The over gets populated. It should definitely be a bug.

If I remove transition, I still see the flickering.

from dnd-kit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.