Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
tsbolty opened this issue Feb 23, 2024 · 2 comments
Open

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

tsbolty opened this issue Feb 23, 2024 · 2 comments

Comments

@tsbolty
Copy link

tsbolty commented Feb 23, 2024

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
Copy link
Member

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
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants