mantinedev / ui.mantine.dev

Mantine UI website and components
https://ui.mantine.dev
MIT License
2.95k stars 317 forks source link

Mantine Drag n' Drop doesn't work in Mantine Drawer #85

Open tsbolty opened 8 months ago

tsbolty commented 8 months ago

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

rtivital commented 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.

jfbaraky commented 1 month ago

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}
          >