plushie/selection
Selection state management for list and table widgets.
Supports single, multi, and range selection modes.
Types
Selection mode.
pub type SelectionMode {
Single
Multi
Range
}
Constructors
-
Single -
Multi -
Range
Values
pub fn is_selected(sel: Selection, id: String) -> Bool
Check if an item is selected.
pub fn new_with_order(
mode: SelectionMode,
order: List(String),
) -> Selection
Create with a known item order (for range selection).
pub fn range_select(sel: Selection, id: String) -> Selection
Select a range from the anchor to the given item (Range mode). Uses the order list to determine which items fall in the range.