hello-pangea / dnd

💅 Beautiful and accessible drag and drop for lists with React. ⭐️ Star to support our work!
https://dnd.hellopangea.com
Other
2.48k stars 95 forks source link

Droppable container position not updated during drag event. #804

Open patricehotz opened 4 months ago

patricehotz commented 4 months ago

Expected behavior

When the position of the droppable container changes during drag event, it still works as intended.

Actual behavior

When the posistion of the droppable container changes during a drag event, hello-pangea still thinks the container is at previous posistion and thus does not work correctly.

Steps to reproduce

In my case i use multiple accordions with drag drop lists inside of it. I also implemented, that during a drag event, i can hover over a closed accordion which results in it opening up. But because it was not open on drag start, it does not work.

Suggested solution?

I think that in the background it is managed with x y position of the droppable container and this position does not get updated. probably could be fixed with a ref or something that updates the position.

What version of React are you using?

^18.2.0

What version of @hello-pangea/dnd are you running?

16.5.0

What browser are you using?

chrome

Demo

sadge.webm