Skip to main content

use_drag

Function use_drag 

Source
pub fn use_drag<T: 'static>() -> State<Option<T>>
Expand description

Access the global drag state for payloads of type T.

Returns a [State] that holds Some(payload) while a DragZone of T is being dragged and None otherwise. Useful for components that need to react to ongoing drags (for example to display drop targets only while dragging).