-
-
Notifications
You must be signed in to change notification settings - Fork 602
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
Elements opacity is not being reset with multiple Draggable elements #53
Comments
Hey @sscaff1, currently the https://codesandbox.io/s/focused-thompson-5cxqv?file=/src/App.js Having more than a single I'm not familiar with the specifics of what the use-case you're building are, but my general advice would be that rendering the The rationale being that if your draggable component is reparented, the drop animation will not work since your draggable component will unmount and re-mount (which will also cause the |
Thanks for explaining this. I want to render a different element depending in the DragOverlay on the type of the draggable. I'm guessing; however, I can just use |
Gotcha. That's a fair use-case. For the time being, you'd need knowledge of what type of overlay the associated active draggable In future versions of |
Here is a codesandbox with the issue. If you have a single Draggable element, then the default animation associated with DragOverlay works fine. If you have multiple Draggable elements then the animation associated with DragOverlay is broken. It looks like it never resets to the original opacity. Not sure why.
https://codesandbox.io/s/intelligent-lake-uyimh?file=/src/App.js
Looks like these lines don't run
dnd-kit/packages/core/src/components/DragOverlay/hooks/useDropAnimation.ts
Lines 104 to 106 in ae212fe
Anyway around this?
I mean you can get around this by setting the dropAnimation={null} in the DragOverlay (although that's not desired for my use-case).
The text was updated successfully, but these errors were encountered: