Skip to main content

MultiSelect

Function MultiSelect 

Source
pub fn MultiSelect(_: MultiSelectProps) -> Element
Expand description

Native checkboxes in a <details>, so choosing and form submission work without script; filtering, bulk actions, and the summary are added on top. Escape closes the panel and returns focus to its summary.

§Props

For details, see the props struct definition.

  • label : Element

    What is being chosen, shown in the summary, e.g. “Project members”.

  • legend : Element

    The fieldset’s legend.

  • name : String

    Shared name for form submission.

  • options : Vec<MultiOption>
  • values : Option<ReadSignal<Vec<String>>>
  • default_values : Vec<String>
  • onchange : Option<EventHandler<Vec<String>>>
  • filter_label : Option<String>

    Label for the filter field; no filter when omitted.

  • filter_placeholder : Option<String>
  • open : bool
  • summary : Option<Callback<usize,String>>

    Summary text for a count; default_summary when omitted.

  • fc_id : Option<Id>

    Mirror the selection count into the data-fc-* contract under this id.

  • class : Option<String>
  • attributes : Vec<Attribute>