pub fn SelectableDraggable<K: Clone + PartialEq + 'static>(
_: SelectableDraggableProps<K>,
) -> ElementExpand description
A draggable list/grid item participating in a selection.
- Click / Ctrl+click manage the selection (via
Selection::click). - Dragging a selected item picks up the whole selection; dragging an unselected one picks up just that item (and selects it).
- Works with mouse, touch, pen and keyboard (wraps
PointerDraggable). - The wrapper exposes
data-selected="true"for styling.
Requires a DndProvider::<Vec<K>> ancestor.
§Props
For details, see the props struct definition.
item:KThis item’s key.
selection:Selection<K>Shared selection state from
use_selection.zone:Option<ZoneId>The zone this item lives in.
effect:DropEffectDrop effect. Defaults to
Move.label:Option<String>Label for screen-reader announcements.
attributes:Vec<Attribute>children:Element