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

Destination null when dropping onto a smaller area #1182

Closed
lulious opened this issue Mar 20, 2019 · 3 comments
Closed

Destination null when dropping onto a smaller area #1182

lulious opened this issue Mar 20, 2019 · 3 comments

Comments

@lulious
Copy link

lulious commented Mar 20, 2019

Bug or feature request?

Hey, I'm trying to implement a pretty basic feature but I'm stuck for some reason. The idea is to let users drag an item onto a trash can to delete it. I already implemented dnd for moving items around and it works perfectly, all I did now was I added a second droppable and put the icon inside of it. For some reason though when I drop onto it, I get destination: null. It might have something to do with the width of each droppable. when the width of the draggable is smaller than the droppable, the destination is null?
Is there something I'm missing here? It could be a bug or maybe you're just supposed to use icons as droppables in a different way. And is width really an issue?

@lulious lulious changed the title Destination null when dropping onto an smaller area Destination null when dropping onto a smaller area Mar 20, 2019
@alexreardon
Copy link
Collaborator

Hi there!

Thanks for raising this issue. Can you please create a standalone example on codesandbox.io using our boilerplate: https://codesandbox.io/s/k260nyxq9v

Without a standalone example, we will not be able to action this one

Cheers!

@alexreardon
Copy link
Collaborator

It might be an area thing: try dropping the center of the dragging item onto your trash bin. If that works, try increasing the space your trash bin Droppable element takes up, even if it is visually the same size

@alexreardon
Copy link
Collaborator

This is related to #930

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

No branches or pull requests

2 participants