Open tsbolty opened 8 months ago
Mantine does not provide any drag'n'drop components/hooks. Reference the documentation of the library that you use to lean how to fix an issue in your application.
We're experiencing the same issue when using the example provided on Mantine UI.
While it works, when used inside a drawer, the component being dragged appears far to the right and isn't visible. To resolve this, we forced the style inside draggableProps
to always set both left
and right
to zero, ensuring the items stay within the drawer.
<div
ref={provided.innerRef}
{...provided.dragHandleProps}
{...{
...provided.draggableProps,
style: { ...provided.draggableProps.style, left: 0, right: 0 },
}}
key={index}
>
Dragging and dropping elements inside a Mantine drawer function, but have a UI bug.
While dragging, the element is not visible. See attached sandbox for reference.
sandbox