You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey! I implemented the dnd feature on my app, the interface is like this:
The section on the left contains two elements in a column both wrapped with Droppable
and the section on the right contains the grid of elements (all wrapped with Draggable)
The issue is sometimes for the last row of the grid, when I drag the element and drop it over the Droppable element, the over is returned null. The code for handleDragStart, handleDragEnd, Draggable and Droppable are below for reference.
consthandleDragStart=(event)=>{setActiveId(event.active.id);letindex=duplicates.findIndex((i)=>i.name==event.active.id);if(index>=0){updateSelected(index);}};// The over is null sometimesconsthandleDragEnd=({ over })=>{setActiveId(null);if(over){if(over.id==="list-drop"){addToList();}elseif(over.id==="image-drop"){updateCurrent();}}};
Hey! I implemented the dnd feature on my app, the interface is like this:
The section on the left contains two elements in a column both wrapped with
Droppable
and the section on the right contains the grid of elements (all wrapped with
Draggable
)The issue is sometimes for the last row of the grid, when I drag the element and drop it over the Droppable element, the
over
is returnednull
. The code forhandleDragStart
,handleDragEnd
,Draggable
andDroppable
are below for reference.The code for the right section
The text was updated successfully, but these errors were encountered: