Skip to main content

Module combo_box

Module combo_box 

Source
Expand description

ComboBox — dropdown selection widget.

Generic over the item type T: Clone + PartialEq + 'static. Selection is value-based: the bound Signal<Option<T>> survives reorder and insertion of the backing model. Items come from one of four input paths:

The dropdown panel is pre-created during build() and kept dormant until opened via click, Enter, Space, or ArrowDown/ArrowUp.

The widget is split across four internal modules:

  • state holds the interaction-state enum, the ItemSource accessor, and color/index helpers.
  • item holds the single-row DropdownItem widget.
  • panel holds the DropdownPanel overlay content and the FilteredItemList inner widget.
  • tests holds the headless unit tests.

Structs§

ComboBox
A dropdown selection widget.

Enums§

ComboBoxVariant
Tier-1 design-language variant for a combo box trigger. Mirrors the TextInputVariant shape because both controls live in the same “form-field” visual family — apps that ship a Material 3 theme typically want filled triggers for both, etc.