New to Kendo UI for AngularStart a free 30-day trial

Represents the Kendo UI for Angular DropDownList component.

Definition

Package:@progress/kendo-angular-dropdowns

Selector:kendo-dropdownlist

Export Name:Accessible in templates as #kendoDropDownListInstance="kendoDropDownList"

Syntax:

html
<kendo-dropdownlist [data]="["Item 1", "Item 2", "Item 3"]"></kendo-dropdownlist>

Inputs

Enables or disables the adaptive mode. The adaptive rendering is disabled by default.

Default:

'none'

Sets the subtitle of the ActionSheet rendered instead of the Popup on small screens. By default, the ActionSheet does not render a subtitle.

Default:

''

Sets the title of the ActionSheet rendered instead of the Popup on small screens. By default, the ActionSheet title uses the label text of the DropDownListComponent.

Default:

''

data

any

Sets the data of the DropDownListComponent.

The data must be an array-like list.

Sets the text of the default empty item. The value type must match the data type.

delay

number

Sets the delay before an item search is performed. Use this option when filtration is disabled.

Default:

500

disabled

boolean

Sets the disabled state of the component. To disable the component in reactive forms, see Forms Support.

Sets the fillMode of the component. The default value is set by the Kendo theme.

filterable

boolean

Enables the filtering functionality of the DropDownListComponent.

Default:

false

ignoreCase

boolean

Enables a case-insensitive search. Use this option when filtration is disabled.

Default:

true

Defines a Boolean function executed for each data item in the component. Determines whether the item is disabled. See examples.

Sets the height of the options list in the popup.

The listHeight property affects only the list of options, not the whole popup container. To set the height of the popup container, use popupSettings.height.

When using adaptiveMode and the screen size is small or medium, the listHeight property is set to null.

Default:

200

loading

boolean

Sets and gets the loading state of the DropDownListComponent.

Configures the popup of the DropDownListComponent.

The available options are:

  • animate: Boolean—Controls the popup animation. The open and close animations are enabled by default.
  • width: Number | String—Sets the width of the popup container. By default, the width of the host element is used. If set to auto, the component automatically adjusts the width of the popup and no item labels are wrapped. The auto mode is not supported when virtual scrolling is enabled.
  • height: Number—Sets the height of the popup container.
  • popupClass: String—Specifies a list of CSS classes used to style the popup.
  • appendTo: "root" | "component" | ViewContainerRef—Specifies the component to which the popup will be appended.

readonly

boolean

Sets the read-only state of the component.

Default:

false

Sets the border radius of the component. The default value is set by the Kendo theme.

Shows or hides the current group sticky header when using grouped data. The sticky header displays by default. see example.

Default:

true

Sets the size of the component. The default value is set by the Kendo theme.

tabindex

number

Specifies the tabindex of the component.

Default:

0

textField

string

Sets the data item field that represents the item text. If the data contains only primitive values, do not define this property.

The textField property can point to a nested property value, for example, category.name.

Sets the value of the DropDownListComponent. The value can be a primitive (string, number) or a complex object. Use the valuePrimitive option to define the type.

All selected values not present in the source are ignored.

Sets the data item field that represents the item value. If the data contains only primitive values, do not define this property.

The valueField property can point to a nested property value, for example, category.id.

Specifies the type of the selected value. If set to true, the selected value must be a primitive value.

Enables the virtualization functionality.

Fields

isOpen

boolean

Returns the current open state. Returns true if the popup or actionSheet is open.

Events

Fires each time the DropDownListComponent gets blurred.

close

EventEmitter​<PreventableEvent>

Fires each time the popup is about to close. This event is preventable. If you cancel it, the popup remains open. see example.

Fires after the popup has been closed.

  • Fires each time the user types in the input field. You can filter the source based on the filtration value. When the value is programmatically changed, the valueChange event is not triggered. See example..

Fires each time the user focuses the DropDownListComponent.

open

EventEmitter​<PreventableEvent>

Fires each time the popup is about to open. This event is preventable. If you cancel it, the popup remains closed. see example.

Fires after the popup has been opened.

Fires each time the item selection changes. see example..

Fires each time the value changes. See example..

Methods

Blurs the DropDownListComponent.

Focuses the DropDownListComponent.

Focuses a specific item of the DropDownListComponent based on the provided index. If there is a default item, it is positioned at index -1. If null or an invalid index is provided, the focus is removed.

Parameters:indexnumber

Resets the value of the DropDownListComponent. If you use the reset method to clear the value, the model does not update automatically and the selectionChange and valueChange events are not fired.

Toggles the visibility of the Popup or ActionSheet. If you use the toggle method to open or close the Popup, the open and close events are not fired.

Parameters:open?boolean

The state of the popup.