clauderic / dnd-kit

The modern, lightweight, performant, accessible and extensible drag & drop toolkit for React.

Home Page:http://dndkit.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to ensure draggable items drag over (and not under) other items in the list

Luke-kb opened this issue · comments

Is there a way to ensure that when dragging items along a vertical list, that the dragged item remains on top of the other items?
this sandbox demonstrates the issue

solved. I needed these styles on the draggable component:

position: isDragging ? "relative" : "inherit",
zIndex: isDragging? 1000 : 0,