#[non_exhaustive]pub struct PointerDraggableProps<T: Clone + PartialEq + 'static> {
pub payload: T,
pub zone: Option<ZoneId>,
pub effect: DropEffect,
pub disabled: bool,
pub label: Option<String>,
pub threshold: f64,
pub on_drag_start: Option<EventHandler<()>>,
pub on_drag_end: Option<EventHandler<bool>>,
pub attributes: Vec<Attribute>,
pub children: Element,
}Expand description
Properties for the PointerDraggable component.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.payload: TThe value delivered on drop.
zone: Option<ZoneId>The zone this item lives in (reported in DropOutcome::from).
effect: DropEffectDrop effect. Defaults to Move.
disabled: boolDisable dragging without unmounting.
label: Option<String>Label for screen-reader announcements (forwarded to the inner
Draggable).
threshold: f64Movement (px) before a touch counts as a drag rather than a tap.
on_drag_start: Option<EventHandler<()>>Fired when a drag begins (either path).
on_drag_end: Option<EventHandler<bool>>Fired when the drag ends; true if a zone consumed the payload.
attributes: Vec<Attribute>§children: ElementImplementations§
Source§impl<T: Clone + PartialEq + 'static> PointerDraggableProps<T>
impl<T: Clone + PartialEq + 'static> PointerDraggableProps<T>
Sourcepub fn builder() -> PointerDraggablePropsBuilder<((), (), (), (), (), (), (), (), (), ()), T>
pub fn builder() -> PointerDraggablePropsBuilder<((), (), (), (), (), (), (), (), (), ()), T>
Create a builder for building PointerDraggableProps.
On the builder, call .payload(...), .zone(...)(optional), .effect(...)(optional), .disabled(...)(optional), .label(...)(optional), .threshold(...)(optional), .on_drag_start(...)(optional), .on_drag_end(...)(optional), .attributes(...)(optional), .children(...)(optional) to set the values of the fields.
Finally, call .build() to create the instance of PointerDraggableProps.