Combobox
Combines editable text, filtering, optional chips, and a native suggestion surface.
#Import
Import Combobox from quickgui.
use quickgui::*;#Usage
let mut state = ComboboxState::new(items);
state.set_query("pro");
div().child(text_input(state.query()))#Anatomy
Combobox::rootCombobox::inputCombobox::option_partCombobox::labelCombobox::valueCombobox::iconCombobox::input_groupCombobox::clearCombobox::triggerCombobox::chipsCombobox::chipCombobox::chip_removeCombobox::backdropCombobox::portalCombobox::positionerCombobox::popupCombobox::arrowCombobox::statusCombobox::emptyCombobox::listCombobox::rowCombobox::itemCombobox::item_indicatorCombobox::groupCombobox::group_labelCombobox::collectionCombobox::separator
#API reference
Expand an entry for its description and complete signature. A dash means no declaration default is documented.
ComboboxState
View sourcepub fn new(items: impl IntoIterator<Item = PickerItem<T>>) -> Result<Self, PickerError>with_layoutpub fn with_layout(mut self, layout: ComboboxPopoverLayout) -> Self—
Configures with layout for this part.
pub fn with_layout(mut self, layout: ComboboxPopoverLayout) -> SelfView sourcewith_filter_modepub fn with_filter_mode(mut self, mode: PickerFilterMode) -> Self—
Configures with filter mode for this part.
pub fn with_filter_mode(mut self, mode: PickerFilterMode) -> SelfView sourcewith_selected_sourcepub fn with_selected_source(mut self, source_index: usize) -> Self—
Set an initial selection before a runtime context exists.
pub fn with_selected_source(mut self, source_index: usize) -> SelfView sourcewith_selected_idpub fn with_selected_id(mut self, id: impl Into<ElementId>) -> Self—
Set an initial stable-ID selection before a runtime context exists.
pub fn with_selected_id(mut self, id: impl Into<ElementId>) -> SelfView sourcelayoutpub const fn layout(&self) -> ComboboxPopoverLayout—
set_layoutpub fn set_layout(&mut self, layout: ComboboxPopoverLayout, cx: &mut EventContext) -> bool—
Replace popover geometry and synchronously dismiss an obsolete fixed-size child.
pub fn set_layout(&mut self, layout: ComboboxPopoverLayout, cx: &mut EventContext) -> boolView sourceitemspub fn items(&self) -> &[PickerItem<T>]—
set_itemspub fn set_items( &mut self, items: impl IntoIterator<Item = PickerItem<T>>, cx: &mut EventContext, ) -> Result<(), PickerError>—
Atomically replace the bounded suggestion source. A committed item with a stable ID is rebound across filtering or reordering. If it is temporarily absent, its cloned committed value and label remain authoritative while its current source index becomes `None`.
pub fn set_items( &mut self, items: impl IntoIterator<Item = PickerItem<T>>, cx: &mut EventContext, ) -> Result<(), PickerError>View sourcefilter_modepub const fn filter_mode(&self) -> PickerFilterMode—
set_filter_modepub fn set_filter_mode(&mut self, mode: PickerFilterMode, cx: &mut EventContext) -> bool—
Configures set filter mode for this part.
pub fn set_filter_mode(&mut self, mode: PickerFilterMode, cx: &mut EventContext) -> boolView sourcequerypub fn query(&self) -> &Arc<str>—
input_valuepub fn input_value(&self) -> &Arc<str>—
The visible input value: an edit query while open, otherwise the committed label.
pub fn input_value(&self) -> &Arc<str>View sourceselected_source_indexpub fn selected_source_index(&self) -> Option<usize>—
Configures selected source index for this part.
pub fn selected_source_index(&self) -> Option<usize>View sourceselected_itempub fn selected_item(&self) -> Option<&PickerItem<T>>—
Configures selected item for this part.
pub fn selected_item(&self) -> Option<&PickerItem<T>>View sourceselected_valuepub fn selected_value(&self) -> Option<&T>—
selected_labelpub fn selected_label(&self) -> Option<&Arc<str>>—
Configures selected label for this part.
pub fn selected_label(&self) -> Option<&Arc<str>>View sourceset_selected_sourcepub fn set_selected_source(&mut self, source_index: usize, cx: &mut EventContext) -> bool—
Replace the committed selection and close any open suggestion child.
pub fn set_selected_source(&mut self, source_index: usize, cx: &mut EventContext) -> boolView sourceset_selected_idpub fn set_selected_id(&mut self, id: impl Into<ElementId>, cx: &mut EventContext) -> bool—
Configures set selected id for this part.
pub fn set_selected_id(&mut self, id: impl Into<ElementId>, cx: &mut EventContext) -> boolView sourceclear_selectionpub fn clear_selection(&mut self, cx: &mut EventContext) -> bool—
Configures clear selection for this part.
pub fn clear_selection(&mut self, cx: &mut EventContext) -> boolView sourcemultiplepub fn multiple(mut self, multiple: bool) -> Self—
Accept more than one committed value, Base UI's `multiple`. A multiple combobox keeps its committed values as bounded chips instead of writing one label back into the input, so the input stays an editing query after every commit.
pub fn multiple(mut self, multiple: bool) -> SelfView sourceset_multiplepub fn set_multiple(&mut self, multiple: bool) -> bool—
Replace the multiple flag in place, reporting whether anything changed.
pub fn set_multiple(&mut self, multiple: bool) -> boolView sourceis_multiplepub const fn is_multiple(&self) -> bool—
auto_highlightpub const fn auto_highlight(mut self, auto_highlight: bool) -> Self—
Highlight the first result as soon as one exists, Base UI's `autoHighlight`.
pub const fn auto_highlight(mut self, auto_highlight: bool) -> SelfView sourceauto_highlightspub const fn auto_highlights(&self) -> bool—
open_on_input_clickpub const fn open_on_input_click(mut self, open_on_input_click: bool) -> Self—
Open the suggestion surface when the input itself is clicked, Base UI's `openOnInputClick`.
pub const fn open_on_input_click(mut self, open_on_input_click: bool) -> SelfView sourceopens_on_input_clickpub const fn opens_on_input_click(&self) -> bool—
Configures opens on input click for this part.
pub const fn opens_on_input_click(&self) -> boolView sourcehighlight_item_on_hoverpub const fn highlight_item_on_hover(mut self, highlight: bool) -> Self—
Move the highlight with the pointer, Base UI's `highlightItemOnHover`.
pub const fn highlight_item_on_hover(mut self, highlight: bool) -> SelfView sourcehighlights_item_on_hoverpub const fn highlights_item_on_hover(&self) -> bool—
Configures highlights item on hover for this part.
pub const fn highlights_item_on_hover(&self) -> boolView sourceloop_focuspub const fn loop_focus(mut self, loop_focus: bool) -> Self—
Wrap the highlight at the ends of the result set, Base UI's `loop`.
pub const fn loop_focus(mut self, loop_focus: bool) -> SelfView sourceloops_focuspub const fn loops_focus(&self) -> bool—
read_onlypub const fn read_only(mut self, read_only: bool) -> Self—
Refuse value changes while staying focusable, Base UI's `readOnly`.
pub const fn read_only(mut self, read_only: bool) -> SelfView sourceis_read_onlypub const fn is_read_only(&self) -> bool—
requiredpub const fn required(mut self, required: bool) -> Self—
Require a value before submission, Base UI's `required`.
pub const fn required(mut self, required: bool) -> SelfView sourceis_requiredpub const fn is_required(&self) -> bool—
set_filterpub fn set_filter(&mut self, filter: Option<PickerFilter>, cx: &mut EventContext) -> bool—
Replace the built-in filter policy with an application-supplied predicate, Base UI's `filter`. Passing `None` restores [`Self::filter_mode`], whose combobox default is [`PickerFilterMode::Contains`].
pub fn set_filter(&mut self, filter: Option<PickerFilter>, cx: &mut EventContext) -> boolView sourcewith_filterpub fn with_filter(mut self, filter: PickerFilter) -> Self—
Declare an application-supplied filter predicate at construction time.
pub fn with_filter(mut self, filter: PickerFilter) -> SelfView sourcefilterpub fn filter(&self) -> Option<&PickerFilter>—
The custom filter predicate, when one is installed.
pub fn filter(&self) -> Option<&PickerFilter>View sourcechip_labelspub fn chip_labels(&self) -> impl Iterator<Item = &Arc<str>>—
Every committed chip label, in commit order, Base UI's `Combobox.Chips` contents.
pub fn chip_labels(&self) -> impl Iterator<Item = &Arc<str>>View sourcechip_valuespub fn chip_values(&self) -> impl Iterator<Item = &T>—
Every committed chip value, in commit order.
pub fn chip_values(&self) -> impl Iterator<Item = &T>View sourcechip_countpub fn chip_count(&self) -> usize—
add_chip_sourcepub fn add_chip_source(&mut self, source_index: usize) -> bool—
Commit one more source row as a chip, up to [`MAX_COMBOBOX_VALUES`]. Returns `false` for a disabled row, an already-committed row, a read-only combobox, or a chip set that is already full.
pub fn add_chip_source(&mut self, source_index: usize) -> boolView sourceremove_chippub fn remove_chip(&mut self, chip_index: usize) -> bool—
Remove one chip, Base UI's `Combobox.ChipRemove`.
pub fn remove_chip(&mut self, chip_index: usize) -> boolView sourceclear_chipspub fn clear_chips(&mut self) -> bool—
set_pressedpub const fn set_pressed(&mut self, pressed: bool) -> bool—
Record that the trigger is held down, Base UI's `data-pressed`.
pub const fn set_pressed(&mut self, pressed: bool) -> boolView sourceset_focusedpub const fn set_focused(&mut self, focused: bool) -> bool—
Record input focus, and mark the control touched when focus leaves it.
pub const fn set_focused(&mut self, focused: bool) -> boolView sourcereset_touchedpub const fn reset_touched(&mut self) -> bool—
Forget that the control was interacted with, for a form that has just been reset. This is the counterpart of [`Self::reset_dirty`]: a value applied from a declaration is not an interaction, so a host that seeds the control reports Base UI's `data-touched` only for what the user really did.
pub const fn reset_touched(&mut self) -> boolView sourcereset_dirtypub const fn reset_dirty(&mut self) -> bool—
Forget that the value changed, for a form that has just been submitted or reset.
pub const fn reset_dirty(&mut self) -> boolView sourceis_dirtypub const fn is_dirty(&self) -> bool—
is_touchedpub const fn is_touched(&self) -> bool—
is_focusedpub const fn is_focused(&self) -> bool—
statepub fn state(&self) -> ComboboxPartState—
A copyable render-state snapshot the application styles from.
pub fn state(&self) -> ComboboxPartStateView sourcestatus_textpub fn status_text(&self) -> Arc<str>—
The live-region text a mounted `Status` part announces, Base UI's `Combobox.Status`. The wording is intentionally minimal and English-free of punctuation so an application can replace it; QuickGUI owns only the counting and the exactly-once announcement.
pub fn status_text(&self) -> Arc<str>View sourceis_empty_resultpub fn is_empty_result(&self) -> bool—
Whether the `Empty` part should be mounted, Base UI's `Combobox.Empty`.
pub fn is_empty_result(&self) -> boolView sourcepopover_windowpub const fn popover_window(&self) -> Option<WindowHandle>—
Configures popover window for this part.
pub const fn popover_window(&self) -> Option<WindowHandle>View sourceis_openpub const fn is_open(&self) -> bool—
is_disabledpub const fn is_disabled(&self) -> bool—
set_disabledpub fn set_disabled(&mut self, disabled: bool, cx: &mut EventContext) -> bool—
Configures set disabled for this part.
pub fn set_disabled(&mut self, disabled: bool, cx: &mut EventContext) -> boolView sourceis_invalidpub const fn is_invalid(&self) -> bool—
set_invalidpub fn set_invalid(&mut self, invalid: bool) -> bool—
Configures set invalid for this part.
pub fn set_invalid(&mut self, invalid: bool) -> boolView sourcevalidation_messagepub fn validation_message(&self) -> Option<&Arc<str>>—
Configures validation message for this part.
pub fn validation_message(&self) -> Option<&Arc<str>>View sourceset_validation_messagepub fn set_validation_message(&mut self, message: impl Into<Arc<str>>) -> bool—
Configures set validation message for this part.
pub fn set_validation_message(&mut self, message: impl Into<Arc<str>>) -> boolView sourceclear_validation_messagepub fn clear_validation_message(&mut self) -> bool—
Configures clear validation message for this part.
pub fn clear_validation_message(&mut self) -> boolView sourceresult_countpub fn result_count(&self) -> usize—
total_match_countpub fn total_match_count(&self) -> usize—
active_result_indexpub fn active_result_index(&self) -> Option<usize>—
Configures active result index for this part.
pub fn active_result_index(&self) -> Option<usize>View sourceactive_source_indexpub fn active_source_index(&self) -> Option<usize>—
Configures active source index for this part.
pub fn active_source_index(&self) -> Option<usize>View sourceclosepub fn close(&mut self, cx: &mut EventContext) -> bool—
surface_idpub fn surface_id(id: impl Into<ElementId>) -> ElementId—
Configures surface id for this part.
pub fn surface_id(id: impl Into<ElementId>) -> ElementIdView sourcelabel_idpub fn label_id(id: impl Into<ElementId>) -> ElementId—
Stable identity of the mounted label part.
pub fn label_id(id: impl Into<ElementId>) -> ElementIdView sourcevalue_idpub fn value_id(id: impl Into<ElementId>) -> ElementId—
Stable identity of the mounted value part.
pub fn value_id(id: impl Into<ElementId>) -> ElementIdView sourceicon_idpub fn icon_id(id: impl Into<ElementId>) -> ElementId—
Stable identity of the mounted icon part.
pub fn icon_id(id: impl Into<ElementId>) -> ElementIdView sourceinput_group_idpub fn input_group_id(id: impl Into<ElementId>) -> ElementId—
Stable identity of the input group wrapping the input and its affordances.
pub fn input_group_id(id: impl Into<ElementId>) -> ElementIdView sourceclear_idpub fn clear_id(id: impl Into<ElementId>) -> ElementId—
Stable identity of the clear control.
pub fn clear_id(id: impl Into<ElementId>) -> ElementIdView sourcetrigger_idpub fn trigger_id(id: impl Into<ElementId>) -> ElementId—
Stable identity of the surface trigger.
pub fn trigger_id(id: impl Into<ElementId>) -> ElementIdView sourcechips_idpub fn chips_id(id: impl Into<ElementId>) -> ElementId—
Stable identity of the chip container.
pub fn chips_id(id: impl Into<ElementId>) -> ElementIdView sourcechip_idpub fn chip_id(id: impl Into<ElementId>, chip_index: usize) -> ElementId—
Stable identity of one chip.
pub fn chip_id(id: impl Into<ElementId>, chip_index: usize) -> ElementIdView sourcechip_remove_idpub fn chip_remove_id(id: impl Into<ElementId>, chip_index: usize) -> ElementId—
Stable identity of one chip's remove control.
pub fn chip_remove_id(id: impl Into<ElementId>, chip_index: usize) -> ElementIdView sourcebackdrop_idpub fn backdrop_id(id: impl Into<ElementId>) -> ElementId—
Stable identity of the optional owner-window backdrop.
pub fn backdrop_id(id: impl Into<ElementId>) -> ElementIdView sourcearrow_idpub fn arrow_id(id: impl Into<ElementId>) -> ElementId—
Stable identity of the decorative popup arrow.
pub fn arrow_id(id: impl Into<ElementId>) -> ElementIdView sourcestatus_idpub fn status_id(id: impl Into<ElementId>) -> ElementId—
Stable identity of the result-count live region.
pub fn status_id(id: impl Into<ElementId>) -> ElementIdView sourceempty_idpub fn empty_id(id: impl Into<ElementId>) -> ElementId—
Stable identity of the no-results part.
pub fn empty_id(id: impl Into<ElementId>) -> ElementIdView sourcelist_idpub fn list_id(id: impl Into<ElementId>) -> ElementId—
Stable identity of the scrolling result list inside the popup.
pub fn list_id(id: impl Into<ElementId>) -> ElementIdView sourcecollection_idpub fn collection_id(id: impl Into<ElementId>) -> ElementId—
Stable identity of the collection wrapper inside the list.
pub fn collection_id(id: impl Into<ElementId>) -> ElementIdView sourceoption_id_for_sourcepub fn option_id_for_source( &self, id: impl Into<ElementId>, source_index: usize, ) -> Option<ElementId>—
Configures option id for source for this part.
pub fn option_id_for_source( &self, id: impl Into<ElementId>, source_index: usize, ) -> Option<ElementId>View sourceComboboxState::root_with
View sourcepub fn root_with(root: Element) -> ElementDecorate the optional application-owned structural wrapper, Base UI's `Combobox.Root`.
ComboboxState::root
View sourcepub fn root() -> ElementCreate the unstyled root part. Use [`Self::root_with`] to supply an existing element.
ComboboxState::label_with
View sourcepub fn label_with(id: impl Into<ElementId>, label: Element) -> ElementDecorate the caller-owned visible label, Base UI's `Combobox.Label`.
ComboboxState::label
View sourcepub fn label(id: impl Into<ElementId>) -> ElementCreate the unstyled label part. Use [`Self::label_with`] to supply an existing element.
ComboboxState::value_with
View sourcepub fn value_with(id: impl Into<ElementId>, value: Element) -> ElementDecorate the caller-owned committed-value text, Base UI's `Combobox.Value`. The input already exposes the value, so this part is decoration.
ComboboxState::value
View sourcepub fn value(id: impl Into<ElementId>) -> ElementCreate the unstyled value part. Use [`Self::value_with`] to supply an existing element.
ComboboxState::icon_with
View sourcepub fn icon_with(id: impl Into<ElementId>, icon: Element) -> ElementDecorate the caller-owned affordance glyph, Base UI's `Combobox.Icon`.
ComboboxState::icon
View sourcepub fn icon(id: impl Into<ElementId>) -> ElementCreate the unstyled icon part. Use [`Self::icon_with`] to supply an existing element.
ComboboxState::input_group_with
View sourcepub fn input_group_with(id: impl Into<ElementId>, group: Element) -> ElementDecorate the wrapper holding the input, chips, and affordances, Base UI's `Combobox.InputGroup`.
ComboboxState::input_group
View sourcepub fn input_group(id: impl Into<ElementId>) -> ElementCreate the unstyled input group part. Use [`Self::input_group_with`] to supply an existing element.
ComboboxState::input_with
View sourcepub fn input_with(&self, id: impl Into<ElementId>, input: Element) -> ElementDecorate the caller-owned editable input, Base UI's `Combobox.Input`. The full interaction — filtering, navigation, the suggestion surface, and committing — is attached by [`Self::element`]; this part adds the form-state projection Base UI publishes alongside it, so a composition that already owns the interaction still reports the same required, read-only, and label relationships.
ComboboxState::input
View sourcepub fn input(&self, id: impl Into<ElementId>) -> ElementCreate the unstyled input part. Use [`Self::input_with`] to supply an existing element.
ComboboxState::chips_with
View sourcepub fn chips_with(id: impl Into<ElementId>, chips: Element) -> ElementDecorate the caller-owned chip container, Base UI's `Combobox.Chips`.
ComboboxState::chips
View sourcepub fn chips(id: impl Into<ElementId>) -> ElementCreate the unstyled chips part. Use [`Self::chips_with`] to supply an existing element.
ComboboxState::chip_with
View sourcepub fn chip_with( id: impl Into<ElementId>, chip_index: usize, label: impl Into<Arc<str>>, chip: Element, ) -> ElementDecorate one caller-owned chip, Base UI's `Combobox.Chip`.
ComboboxState::chip
View sourcepub fn chip( id: impl Into<ElementId>, chip_index: usize, label: impl Into<Arc<str>>, ) -> ElementCreate the unstyled chip part. Use [`Self::chip_with`] to supply an existing element.
ComboboxState::chip_remove_with
View sourcepub fn chip_remove_with( id: impl Into<ElementId>, chip_index: usize, label: impl Into<Arc<str>>, remove: Element, ) -> ElementDecorate one chip's remove control, Base UI's `Combobox.ChipRemove`. The control is a real button with an accessible name, so a keyboard user can reach and remove a chip without the pointer.
ComboboxState::chip_remove
View sourcepub fn chip_remove( id: impl Into<ElementId>, chip_index: usize, label: impl Into<Arc<str>>, ) -> ElementCreate the unstyled chip remove part. Use [`Self::chip_remove_with`] to supply an existing element.
ComboboxState::clear_with
View sourcepub fn clear_with( id: impl Into<ElementId>, label: impl Into<Arc<str>>, clear: Element, ) -> ElementDecorate the caller-owned clear control, Base UI's `Combobox.Clear`. Mount it only while the control holds a value; Base UI hides it otherwise.
ComboboxState::clear
View sourcepub fn clear(id: impl Into<ElementId>, label: impl Into<Arc<str>>) -> ElementCreate the unstyled clear part. Use [`Self::clear_with`] to supply an existing element.
ComboboxState::trigger_with
View sourcepub fn trigger_with( &self, id: impl Into<ElementId>, label: impl Into<Arc<str>>, trigger: Element, ) -> ElementDecorate the caller-owned surface trigger, Base UI's `Combobox.Trigger`.
ComboboxState::trigger
View sourcepub fn trigger(&self, id: impl Into<ElementId>, label: impl Into<Arc<str>>) -> ElementCreate the unstyled trigger part. Use [`Self::trigger_with`] to supply an existing element.
ComboboxState::backdrop_with
View sourcepub fn backdrop_with(id: impl Into<ElementId>, backdrop: Element) -> ElementDecorate an optional caller-painted owner-window backdrop, Base UI's `Combobox.Backdrop`.
ComboboxState::backdrop
View sourcepub fn backdrop(id: impl Into<ElementId>) -> ElementCreate the unstyled backdrop part. Use [`Self::backdrop_with`] to supply an existing element.
ComboboxState::portal_with
View sourcepub fn portal_with(&self, id: impl Into<ElementId>, portal: Element) -> ElementDecorate the suggestion-surface boundary, Base UI's `Combobox.Portal`. The suggestion surface is its own native window, so the portal, the positioner, and the popup are one element and all three names decorate it identically.
ComboboxState::portal
View sourcepub fn portal(&self, id: impl Into<ElementId>) -> ElementCreate the unstyled portal part. Use [`Self::portal_with`] to supply an existing element.
ComboboxState::positioner_with
View sourcepub fn positioner_with(&self, id: impl Into<ElementId>, positioner: Element) -> ElementDecorate the suggestion-surface boundary, Base UI's `Combobox.Positioner`.
ComboboxState::positioner
View sourcepub fn positioner(&self, id: impl Into<ElementId>) -> ElementCreate the unstyled positioner part. Use [`Self::positioner_with`] to supply an existing element.
ComboboxState::popup_with
View sourcepub fn popup_with(&self, id: impl Into<ElementId>, popup: Element) -> ElementDecorate the caller-owned suggestion surface, Base UI's `Combobox.Popup`.
ComboboxState::popup
View sourcepub fn popup(&self, id: impl Into<ElementId>) -> ElementCreate the unstyled popup part. Use [`Self::popup_with`] to supply an existing element.
ComboboxState::arrow_with
View sourcepub fn arrow_with(id: impl Into<ElementId>, arrow: Element) -> ElementPosition a caller-owned decorative arrow, Base UI's `Combobox.Arrow`.
ComboboxState::arrow
View sourcepub fn arrow(id: impl Into<ElementId>) -> ElementCreate the unstyled arrow part. Use [`Self::arrow_with`] to supply an existing element.
ComboboxState::status_with
View sourcepub fn status_with(id: impl Into<ElementId>, status: Element) -> ElementDecorate the caller-owned live region, Base UI's `Combobox.Status`. Render [`Self::status_text`] inside it. The region is polite and is rebuilt only when the application rebuilds the tree, so an unchanged count announces exactly once.
ComboboxState::status
View sourcepub fn status(id: impl Into<ElementId>) -> ElementCreate the unstyled status part. Use [`Self::status_with`] to supply an existing element.
ComboboxState::empty_with
View sourcepub fn empty_with(id: impl Into<ElementId>, empty: Element) -> ElementDecorate the caller-owned no-results part, Base UI's `Combobox.Empty`. Mount it only while [`Self::is_empty_result`] is true. The `Status` region already announces the count, so this part is visual.
ComboboxState::empty
View sourcepub fn empty(id: impl Into<ElementId>) -> ElementCreate the unstyled empty part. Use [`Self::empty_with`] to supply an existing element.
ComboboxState::list_with
View sourcepub fn list_with(&self, id: impl Into<ElementId>, list: Element) -> ElementDecorate the caller-owned scrolling result list, Base UI's `Combobox.List`.
ComboboxState::list
View sourcepub fn list(&self, id: impl Into<ElementId>) -> ElementCreate the unstyled list part. Use [`Self::list_with`] to supply an existing element.
ComboboxState::collection_with
View sourcepub fn collection_with(id: impl Into<ElementId>, collection: Element) -> ElementDecorate a caller-owned wrapper around the mounted rows, Base UI's `Combobox.Collection`.
ComboboxState::collection
View sourcepub fn collection(id: impl Into<ElementId>) -> ElementCreate the unstyled collection part. Use [`Self::collection_with`] to supply an existing element.
ComboboxState::row_with
View sourcepub fn row_with(row: Element) -> ElementDecorate a caller-owned row wrapper for a grid-shaped result, Base UI's `Combobox.Row`.
ComboboxState::row
View sourcepub fn row() -> ElementCreate the unstyled row part. Use [`Self::row_with`] to supply an existing element.
ComboboxState::item_with
View sourcepub fn item_with( &self, id: impl Into<ElementId>, source_index: usize, state: ComboboxItemPartState, item: Element, ) -> Option<Element>Decorate one caller-owned result row, Base UI's `Combobox.Item`.
ComboboxState::item
View sourcepub fn item( &self, id: impl Into<ElementId>, source_index: usize, state: ComboboxItemPartState, ) -> Option<Element>Create the unstyled item part. Use [`Self::item_with`] to supply an existing element.
ComboboxState::item_indicator_with
View sourcepub fn item_indicator_with(indicator: Element) -> ElementDecorate one row's selected mark, Base UI's `Combobox.ItemIndicator`.
ComboboxState::item_indicator
View sourcepub fn item_indicator() -> ElementCreate the unstyled item indicator part. Use [`Self::item_indicator_with`] to supply an existing element.
ComboboxState::group_with
View sourcepub fn group_with(group: Element) -> ElementDecorate a caller-composed result group, Base UI's `Combobox.Group`.
ComboboxState::group
View sourcepub fn group() -> ElementCreate the unstyled group part. Use [`Self::group_with`] to supply an existing element.
ComboboxState::group_label_with
View sourcepub fn group_label_with(label_id: impl Into<ElementId>, label: Element) -> ElementDecorate a group's visible label, Base UI's `Combobox.GroupLabel`.
ComboboxState::group_label
View sourcepub fn group_label(label_id: impl Into<ElementId>) -> ElementCreate the unstyled group label part. Use [`Self::group_label_with`] to supply an existing element.
ComboboxState::separator_with
View sourcepub fn separator_with(separator: Element) -> ElementDecorate a caller-owned divider between groups, Base UI's `Combobox.Separator`.
ComboboxState::separator
View sourcepub fn separator() -> ElementCreate the unstyled separator part. Use [`Self::separator_with`] to supply an existing element.
ComboboxState::element
View sourcepub fn element<V, PopoverRoot, RenderOption, QueryChanged, Change>( &mut self, cx: &mut ViewContext<'_, V>, id: impl Into<ElementId>, label: impl Into<Arc<str>>, access: fn(&mut V) -> &mut ComboboxState<T>, input: Element, popover_root: PopoverRoot, render_option: RenderOption, query_changed: QueryChanged, change: Change, ) -> Element where V: 'static, T: 'static, PopoverRoot: Fn(ComboboxListState) -> Element + Clone + 'static, RenderOption: Fn(&PickerItem<T>, ComboboxOptionState) -> Element + Clone + 'static, QueryChanged: Fn(&mut V, Arc<str>, &mut EventContext) + Clone + 'static, Change: Fn(&mut V, T, &mut EventContext) + Clone + 'static,Build the complete unstyled constrained interaction from caller-owned parts.
ComboboxState::element_with
View sourcepub fn element_with<V, PopoverRoot, RenderOption, QueryChanged, Change>( &mut self, cx: &mut ViewContext<'_, V>, id: impl Into<ElementId>, label: impl Into<Arc<str>>, access: StateAccessor<V, ComboboxState<T>>, input: Element, popover_root: PopoverRoot, render_option: RenderOption, query_changed: QueryChanged, change: Change, ) -> Element where V: 'static, T: 'static, PopoverRoot: Fn(ComboboxListState) -> Element + Clone + 'static, RenderOption: Fn(&PickerItem<T>, ComboboxOptionState) -> Element + Clone + 'static, QueryChanged: Fn(&mut V, Arc<str>, &mut EventContext) + Clone + 'static, Change: Fn(&mut V, T, &mut EventContext) + Clone + 'static,Build the constrained combobox against a per-instance retained-state accessor. A host that renders many declared comboboxes through one view passes an accessor that captures which [`ComboboxState`] each registered listener resolves.
