-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Add onBeforeCapture Responder #1588
Comments
Hi @alexreardon ,
I experienced exact this, so is there any way to make the draggable stay with the cursor? I know the v12.0.0 release note clearly says "dynamic removal" isn't supported, but I just want to confirm, because I don't need "dynamic removal" per se, all I need is to remove some draggables before the drag, not during the drag, is that impossible as well? I'm still using 11.x and it works well, but I'm hoping to move to v12 to benefit from the new collision engine. Thanks! |
I have the same question. I am creating an option for multiple selected rows to drag and drop and using The UX is almost perfect for my purposes otherwise. |
Hi guys, are there any source example of how can this event be implemented. For example here: https://react-beautiful-dnd.netlify.app/?path=/story/onbeforecapture--adding-things |
hi, check out this link: https://github.com/atlassian/react-beautiful-dnd/blob/ec06fa266e1617cab2402e0613b36d88b9547f7f/stories/src/on-before-capture/adding-things.jsx |
I'm also running into this issue where
I think the example is showcasing using the |
A new responder that would be called just before any dimensions are captured.
This has been resisted previously due to potential timing issues. However, due to recent changes it should be safer.
onBeforeCapture
would allow people to change things just before a drag is about to start. This is generally not a good idea as it is a footgun:All that said, a number of scenarios have come up where it would be useful to:
I thought about potentially adding a
getDimension
callback to Draggables and Droppables so that they can tell the system whatever dimension they want. However, this has some strangeness to it too:onBeforeCapture
makes it easier to align what is visible to what is capturedThe text was updated successfully, but these errors were encountered: