Combobox
編集可能なテキスト、絞り込み、任意のチップ、ネイティブの候補表示を組み合わせます。
#インポート
quickgui から Combobox をインポートします。
use quickgui::*;#使い方
let mut state = ComboboxState::new(items);
state.set_query("pro");
div().child(text_input(state.query()))#構成
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 リファレンス
項目を展開すると説明と完全なシグネチャが表示されます。ダッシュは宣言に既定値が記載されていないことを示します。
ComboboxState
ソースを見るpub 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) -> Selfソースを見るwith_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) -> Selfソースを見るwith_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) -> Selfソースを見るwith_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>) -> Selfソースを見るlayoutpub 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) -> boolソースを見るitemspub 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>ソースを見るfilter_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) -> boolソースを見るquerypub 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>ソースを見るselected_source_indexpub fn selected_source_index(&self) -> Option<usize>—
Configures selected source index for this part.
pub fn selected_source_index(&self) -> Option<usize>ソースを見るselected_itempub fn selected_item(&self) -> Option<&PickerItem<T>>—
selected_valuepub fn selected_value(&self) -> Option<&T>—
selected_labelpub fn selected_label(&self) -> Option<&Arc<str>>—
set_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) -> boolソースを見るset_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) -> boolソースを見るclear_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) -> boolソースを見るmultiplepub 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) -> Selfソースを見るset_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) -> boolソースを見るis_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) -> Selfソースを見るauto_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) -> Selfソースを見るopens_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) -> boolソースを見るhighlight_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) -> Selfソースを見るhighlights_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) -> boolソースを見るloop_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) -> Selfソースを見るloops_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) -> Selfソースを見るis_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) -> Selfソースを見るis_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) -> boolソースを見るwith_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) -> Selfソースを見るfilterpub fn filter(&self) -> Option<&PickerFilter>—
The custom filter predicate, when one is installed.
pub fn filter(&self) -> Option<&PickerFilter>ソースを見るchip_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>>ソースを見るchip_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>ソースを見るchip_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) -> boolソースを見るremove_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) -> boolソースを見るclear_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) -> boolソースを見るset_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) -> boolソースを見るreset_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) -> boolソースを見るreset_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) -> boolソースを見るis_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) -> ComboboxPartStateソースを見るstatus_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>ソースを見るis_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) -> boolソースを見るpopover_windowpub const fn popover_window(&self) -> Option<WindowHandle>—
Configures popover window for this part.
pub const fn popover_window(&self) -> Option<WindowHandle>ソースを見るis_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) -> boolソースを見るis_invalidpub const fn is_invalid(&self) -> bool—
set_invalidpub fn set_invalid(&mut self, invalid: bool) -> bool—
validation_messagepub fn validation_message(&self) -> Option<&Arc<str>>—
Configures validation message for this part.
pub fn validation_message(&self) -> Option<&Arc<str>>ソースを見るset_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>>) -> boolソースを見るclear_validation_messagepub fn clear_validation_message(&mut self) -> bool—
Configures clear validation message for this part.
pub fn clear_validation_message(&mut self) -> boolソースを見るresult_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>ソースを見るactive_source_indexpub fn active_source_index(&self) -> Option<usize>—
Configures active source index for this part.
pub fn active_source_index(&self) -> Option<usize>ソースを見るclosepub fn close(&mut self, cx: &mut EventContext) -> bool—
surface_idpub fn surface_id(id: impl Into<ElementId>) -> ElementId—
label_idpub fn label_id(id: impl Into<ElementId>) -> ElementId—
Stable identity of the mounted label part.
pub fn label_id(id: impl Into<ElementId>) -> ElementIdソースを見るvalue_idpub fn value_id(id: impl Into<ElementId>) -> ElementId—
Stable identity of the mounted value part.
pub fn value_id(id: impl Into<ElementId>) -> ElementIdソースを見るicon_idpub fn icon_id(id: impl Into<ElementId>) -> ElementId—
Stable identity of the mounted icon part.
pub fn icon_id(id: impl Into<ElementId>) -> ElementIdソースを見るinput_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>) -> ElementIdソースを見るclear_idpub fn clear_id(id: impl Into<ElementId>) -> ElementId—
trigger_idpub fn trigger_id(id: impl Into<ElementId>) -> ElementId—
Stable identity of the surface trigger.
pub fn trigger_id(id: impl Into<ElementId>) -> ElementIdソースを見るchips_idpub fn chips_id(id: impl Into<ElementId>) -> ElementId—
chip_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) -> ElementIdソースを見るchip_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) -> ElementIdソースを見るbackdrop_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>) -> ElementIdソースを見るarrow_idpub fn arrow_id(id: impl Into<ElementId>) -> ElementId—
Stable identity of the decorative popup arrow.
pub fn arrow_id(id: impl Into<ElementId>) -> ElementIdソースを見るstatus_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>) -> ElementIdソースを見るempty_idpub fn empty_id(id: impl Into<ElementId>) -> ElementId—
list_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>) -> ElementIdソースを見るcollection_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>) -> ElementIdソースを見るoption_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>ソースを見るComboboxState::root_with
ソースを見るpub fn root_with(root: Element) -> ElementDecorate the optional application-owned structural wrapper, Base UI's `Combobox.Root`.
ComboboxState::root
ソースを見るpub fn root() -> ElementCreate the unstyled root part. Use [`Self::root_with`] to supply an existing element.
ComboboxState::label_with
ソースを見るpub fn label_with(id: impl Into<ElementId>, label: Element) -> ElementDecorate the caller-owned visible label, Base UI's `Combobox.Label`.
ComboboxState::label
ソースを見るpub fn label(id: impl Into<ElementId>) -> ElementCreate the unstyled label part. Use [`Self::label_with`] to supply an existing element.
ComboboxState::value_with
ソースを見るpub 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
ソースを見るpub fn value(id: impl Into<ElementId>) -> ElementCreate the unstyled value part. Use [`Self::value_with`] to supply an existing element.
ComboboxState::icon_with
ソースを見るpub fn icon_with(id: impl Into<ElementId>, icon: Element) -> ElementDecorate the caller-owned affordance glyph, Base UI's `Combobox.Icon`.
ComboboxState::icon
ソースを見るpub fn icon(id: impl Into<ElementId>) -> ElementCreate the unstyled icon part. Use [`Self::icon_with`] to supply an existing element.
ComboboxState::input_group_with
ソースを見るpub 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
ソースを見るpub 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
ソースを見るpub 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
ソースを見るpub fn input(&self, id: impl Into<ElementId>) -> ElementCreate the unstyled input part. Use [`Self::input_with`] to supply an existing element.
ComboboxState::chips_with
ソースを見るpub fn chips_with(id: impl Into<ElementId>, chips: Element) -> ElementDecorate the caller-owned chip container, Base UI's `Combobox.Chips`.
ComboboxState::chips
ソースを見るpub fn chips(id: impl Into<ElementId>) -> ElementCreate the unstyled chips part. Use [`Self::chips_with`] to supply an existing element.
ComboboxState::chip_with
ソースを見るpub 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
ソースを見るpub 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
ソースを見るpub 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
ソースを見るpub 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
ソースを見るpub 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
ソースを見るpub 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
ソースを見るpub 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
ソースを見るpub 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
ソースを見るpub fn backdrop_with(id: impl Into<ElementId>, backdrop: Element) -> ElementDecorate an optional caller-painted owner-window backdrop, Base UI's `Combobox.Backdrop`.
ComboboxState::backdrop
ソースを見るpub fn backdrop(id: impl Into<ElementId>) -> ElementCreate the unstyled backdrop part. Use [`Self::backdrop_with`] to supply an existing element.
ComboboxState::portal_with
ソースを見るpub 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
ソースを見るpub fn portal(&self, id: impl Into<ElementId>) -> ElementCreate the unstyled portal part. Use [`Self::portal_with`] to supply an existing element.
ComboboxState::positioner_with
ソースを見るpub fn positioner_with(&self, id: impl Into<ElementId>, positioner: Element) -> ElementDecorate the suggestion-surface boundary, Base UI's `Combobox.Positioner`.
ComboboxState::positioner
ソースを見るpub fn positioner(&self, id: impl Into<ElementId>) -> ElementCreate the unstyled positioner part. Use [`Self::positioner_with`] to supply an existing element.
ComboboxState::popup_with
ソースを見るpub fn popup_with(&self, id: impl Into<ElementId>, popup: Element) -> ElementDecorate the caller-owned suggestion surface, Base UI's `Combobox.Popup`.
ComboboxState::popup
ソースを見るpub fn popup(&self, id: impl Into<ElementId>) -> ElementCreate the unstyled popup part. Use [`Self::popup_with`] to supply an existing element.
ComboboxState::arrow_with
ソースを見るpub fn arrow_with(id: impl Into<ElementId>, arrow: Element) -> ElementPosition a caller-owned decorative arrow, Base UI's `Combobox.Arrow`.
ComboboxState::arrow
ソースを見るpub fn arrow(id: impl Into<ElementId>) -> ElementCreate the unstyled arrow part. Use [`Self::arrow_with`] to supply an existing element.
ComboboxState::status_with
ソースを見るpub 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
ソースを見るpub fn status(id: impl Into<ElementId>) -> ElementCreate the unstyled status part. Use [`Self::status_with`] to supply an existing element.
ComboboxState::empty_with
ソースを見るpub 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
ソースを見るpub fn empty(id: impl Into<ElementId>) -> ElementCreate the unstyled empty part. Use [`Self::empty_with`] to supply an existing element.
ComboboxState::list_with
ソースを見るpub fn list_with(&self, id: impl Into<ElementId>, list: Element) -> ElementDecorate the caller-owned scrolling result list, Base UI's `Combobox.List`.
ComboboxState::list
ソースを見るpub fn list(&self, id: impl Into<ElementId>) -> ElementCreate the unstyled list part. Use [`Self::list_with`] to supply an existing element.
ComboboxState::collection_with
ソースを見るpub 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
ソースを見るpub fn collection(id: impl Into<ElementId>) -> ElementCreate the unstyled collection part. Use [`Self::collection_with`] to supply an existing element.
ComboboxState::row_with
ソースを見るpub fn row_with(row: Element) -> ElementDecorate a caller-owned row wrapper for a grid-shaped result, Base UI's `Combobox.Row`.
ComboboxState::row
ソースを見るpub fn row() -> ElementCreate the unstyled row part. Use [`Self::row_with`] to supply an existing element.
ComboboxState::item_with
ソースを見るpub 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
ソースを見るpub 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
ソースを見るpub fn item_indicator_with(indicator: Element) -> ElementDecorate one row's selected mark, Base UI's `Combobox.ItemIndicator`.
ComboboxState::item_indicator
ソースを見るpub fn item_indicator() -> ElementCreate the unstyled item indicator part. Use [`Self::item_indicator_with`] to supply an existing element.
ComboboxState::group_with
ソースを見るpub fn group_with(group: Element) -> ElementDecorate a caller-composed result group, Base UI's `Combobox.Group`.
ComboboxState::group
ソースを見るpub fn group() -> ElementCreate the unstyled group part. Use [`Self::group_with`] to supply an existing element.
ComboboxState::group_label_with
ソースを見るpub 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
ソースを見るpub 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
ソースを見るpub fn separator_with(separator: Element) -> ElementDecorate a caller-owned divider between groups, Base UI's `Combobox.Separator`.
ComboboxState::separator
ソースを見るpub fn separator() -> ElementCreate the unstyled separator part. Use [`Self::separator_with`] to supply an existing element.
ComboboxState::element
ソースを見るpub 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
ソースを見るpub 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.
