@DTS Engineer Submitted FB16390351.
While the current approach does partially work, it doesn't fully meet the desired behavior. Specifically, when dragging an item, I want the dragged item to become invisible in the ScrollView, as the drag preview already provides users with a visual representation. Unfortunately, using .onDrag and .onDrop identifiers makes this challenging because there’s no built-in mechanism to notify us when a drag operation is completed. Without this notification, we can't reliably restore the visibility of the dragged item in the ScrollView.
The DropDelegate exacerbates this limitation, as its performDropmethod is only invoked when the drop occurs inside the designated target. However, if the drop happens outside the target (e.g., in a completely unrelated view), the drop is treated as a no-op, and no callbacks are triggered. This leaves us unable to handle such scenarios effectively.
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: