The container element that wraps a combobox input and popup, and orchestrates its behavior.
textDirection
anyA signal wrapper for directionality.
element
HTMLElementA reference to the combobox element.
popup
anyThe combobox popup.
filterMode
anyThe filter mode for the combobox.
manual: The consumer is responsible for filtering the options.auto-select: The combobox automatically selects the first matching option.highlight: The combobox highlights matching text in the options without changing selection.
disabled
anyWhether the combobox is disabled.
readonly
anyWhether the combobox is read-only.
firstMatch
anyThe value of the first matching item in the popup.
expanded
anyWhether the combobox is expanded.
alwaysExpanded
anyWhether the combobox popup should always be expanded, regardless of user interaction.
inputElement
anyInput element connected to the combobox, if any.
open
voidOpens the combobox to the selected item.
voidclose
voidCloses the combobox.
voidDescription
The container element that wraps a combobox input and popup, and orchestrates its behavior.
The ngCombobox directive is the main entry point for creating a combobox and customizing its
behavior. It coordinates the interactions between the ngComboboxInput and the popup, which
is defined by a ng-template with the ngComboboxPopupContainer directive. If using the
CdkOverlay, the cdkConnectedOverlay directive takes the place of ngComboboxPopupContainer.
<div ngCombobox filterMode="highlight">
<input
ngComboboxInput
placeholder="Search for a state..."
[(value)]="searchString"
/>
<ng-template ngComboboxPopupContainer>
<div ngListbox [(value)]="selectedValue">