use fission::prelude::*;
fission_component! {
pub SortSheetTrigger<()> {
props {
selected_label: String,
open: bool,
toggle_sheet: ActionEnvelope,
}
}
view(sort, _state, _cx) =>
DropDown(
selected: Some(sort.selected_label.clone()),
is_open: sort.open,
on_toggle: sort.toggle_sheet.clone(),
)
}
Field | Type | Meaning | Notes / default behavior |
|---|---|---|---|
on_toggle | Option<ActionEnvelope> | Action dispatched when the trigger is pressed. | Defaults to None. Usually opens or closes some surrounding surface. |
options | Vec<String> | Option labels associated with the control. | Present in the struct, but not currently rendered by the widget itself. |
on_select | Option<ActionEnvelope> | Selection action placeholder. | Present in the struct, but not currently used by the widget itself. |
is_open | bool | Expanded state of the separately owned surface. | Reported to assistive technology; it does not construct the popup. |
selected | Option<String> | Currently displayed label. | If None, the trigger shows "Select an option". |