dnd-kit icon indicating copy to clipboard operation
dnd-kit copied to clipboard

does not work well in a flex container with the flex wrap property

Open SergGrey1992 opened this issue 2 years ago • 1 comments

Hi all, I am facing a problem that drag and drop is not working well. Prerequisites:

  1. Container flex
  2. Container flex: wrap
  3. The size of dragged elements is different

https://github.com/clauderic/dnd-kit/assets/55402324/370fe1cd-e503-4cad-b3d9-fbd4c77d9a4c

I can kind of understand him needing a foothold to lean on. but I don't understand how to implement such functionality

SergGrey1992 avatar Aug 17 '23 20:08 SergGrey1992

Try to use different collision detectors. For example closest center. https://docs.dndkit.com/api-documentation/context-provider/collision-detection-algorithms

ehrro avatar Nov 24 '23 23:11 ehrro