-
-
Notifications
You must be signed in to change notification settings - Fork 594
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
DragOverlay Not Working With Sortable Context #84
Comments
Hey @LuisOsta, I'm not sure I understand the problem. Can you elaborate? The As for the sortable items, they move in response to the collision detection algorithm detecting which item the drag overlay is currently over, and their position updates depending on the sorting strategy, which also seems to be working as expected in the video you posted. |
Hey @clauderic , Everything around the sortable context works as expected, my confusion was around why the DragOverlay wasn't displaying in the original location of the SortableItem What would be the best way to achieve that? Edit: |
Hey @LuisOsta, to be honest I'm not really sure I understand your use-case well. Is there something that you could point me to to help me better understand what you're trying to achieve? |
I'm going to close this issue for now as there does not seem to be any issue with the library, but we can continue discussing here. |
I thought DragOverlay was supposed to show in the place of the item being dragged too. You need to disable transform property of the Draggable component for the desired effect. E.g: const Draggable = ({...,hasDragOverlay,...}){
...
const style = {
transform: hasDragOverlay ? "unset" : CSS.Translate.toString(transform),
};
...
}
// set hasDragOverlay to true if you are gonna use DragOverlay |
Hey I am having trouble here which is that i am just unable to move my task into another column its like they are stuck with their parent column as well as it has some weird transition when i sort my tasks into same column so ya help me out pls 2024-03-10.22-48-47.mp4 |
Use Case
Users need to be able to move squares around specific squares (in a certain order), so I thought that using SortableContext would be both be the simplest solution that would solve my problem. I'd also love to render a 'default state' of sorts when the users are moving the objects (ie a card with a number shows up)
Problem
When using drag overlay, instead of staying where the original SortableItem was, it moves around alongside the item being moved. Do you know how I could fix this?
Here's a video of the problem
Unique.Expressions.-.Google.Chrome.2021-02-09.08-19-31.mp4
Package Information
Component In Question:
The text was updated successfully, but these errors were encountered: