ComboBoxComponent
Represents the Kendo UI ComboBox component for Angular.
@Component({
selector: 'my-app',
template: `
<kendo-combobox [data]="listItems">
</kendo-combobox>
`
})
class AppComponent {
public listItems: Array<string> = ["Item 1", "Item 2", "Item 3", "Item 4"];
}
Selector
kendo-combobox
Export Name
Accessible in templates as #kendoComboBoxInstance="kendoComboBox"
Inputs
Name | Type | Default | Description |
---|---|---|---|
allowCustom |
|
Specifies whether the ComboBox allows user-defined values that are not present in the dataset
(more information and examples).
Defaults to | |
clearButton |
|
If set to | |
data |
|
Sets the data of the ComboBox.
| |
disabled |
|
Sets the disabled state of the component. | |
fillMode |
|
Sets the fillMode of the component. The possible values are:
| |
filterable |
|
Enables the filtering functionality.
If set to | |
itemDisabled |
|
Defines a Boolean function that is executed for each data item in the component (see examples). Determines whether the item will be disabled. | |
listHeight |
|
Sets the height of the suggestions list. By default,
| |
loading |
|
Sets and gets the loading state of the ComboBox. | |
placeholder |
|
The hint that is displayed when the component is empty. | |
popupSettings |
|
Configures the popup of the ComboBox. The available options are:
| |
readonly |
|
Sets the read-only state of the component. | |
rounded |
|
Sets the border radius of the component. The possible values are:
| |
size |
|
Sets the size of the component. The possible values are:
| |
suggest |
|
Enables the auto-completion of the text based on the first data item. | |
tabindex |
|
Specifies the | |
textField |
|
Sets the data item field that represents the item text. If the data contains only primitive values, do not define it.
| |
value |
|
Sets the value of the ComboBox.
It can either be of the primitive (string, numbers) or of the complex (objects) type.
To define the type, use the
| |
valueField |
|
Sets the data item field that represents the item value. If the data contains only primitive values, do not define it.
| |
valueNormalizer |
|
A user-defined callback which returns normalized custom values.
Typically used when the data items are different from type
| |
valuePrimitive |
|
Specifies the type of the selected value.
If set to | |
virtual |
|
Enables the virtualization functionality. |
Fields
Name | Type | Default | Description |
---|---|---|---|
isOpen |
|
Returns the current open state of the popup. |
Events
Name | Type | Description |
---|---|---|
close |
|
Fires each time the popup is about to close. This event is preventable. If you cancel it, the popup will remain open. |
closed |
|
Fires after the popup has been closed. |
filterChange |
|
Fires each time the user types in the input field. You can filter the source based on the passed filtration value (see example). |
blur |
|
Fires each time the ComboBox gets blurred. |
focus |
|
Fires each time the user focuses the ComboBox. |
open |
|
Fires each time the popup is about to open. This event is preventable. If you cancel it, the popup will remain closed. |
opened |
|
Fires after the popup has been opened. |
selectionChange |
|
Fires each time an item selection is changed (see example). |
valueChange |
|
Fires each time the value is changed—
when the component is blurred or the value is cleared through the Clear button
(see example).
When the value of the component is programmatically changed to |
Methods
blur |
---|
Blurs the ComboBox. |
focus |
---|
Focuses the ComboBox. |
focusItemAt | ||||||
---|---|---|---|---|---|---|
Focuses a specific item of the ComboBox based on a provided index. If null or invalid index is provided the focus will be removed. | ||||||
|
reset |
---|
Resets the value of the ComboBox.
If you use the |
toggle | ||||||
---|---|---|---|---|---|---|
Toggles the visibility of the popup. If you use the | ||||||
|