Dropping element from outside mid-drag causes placeholder to freeze
Describe the bug
Hi,
I have a page layout with react-grid-layout and a side-pane from which I'm dragging to the layout. The dragging is performed using the onDrop prop, with a handler that appends the new item to the layout (layout state, items state). The functionality works as expected, but if I'm dropping the item while dragging the item the placeholder does not disappear. Looking at the internals, I assume that for some reason either the removeDroppingPlaceholder is not triggered or that activeDrag fails to be disabled. I tried both with controlled and uncontrolled droppingItem prop. Unfortunately I'm working in a closed network so I can't share a video of the behavior, and I also couldn't reproduce it easily on e.g. codesandbox. I assume I hit some weird edge case.
Note: looking at recent issues, perhaps it's related to #2262. Also, I've seen this #2239 fix in handleDragOver, perhaps something similar is needed in onDrop?
version: 2.2.3
Your Example Website or App
NA
Steps to Reproduce the Bug or Issue
- create drop-from-outside
- drag a (perhaps complicated) item from outside and drop mid-dragging
- placeholder should still appear
Stack: React 19, vite, react-resizeable 3.0.5, react-grid-layout 2.2.3
Expected behavior
The placeholder should be removed on drop.
react-grid-layout library version
2.2.3
Operating System Version
Windows
Browser
Chrome
Additional context
No response
Screenshots or Videos
No response
Source: react-grid-layout/react-grid-layout