All Components

DropDownList Overview

The DropDownList is a form component that lets you choose a single predefined value from a list.

It is a richer version of the <select> element and supports data binding, filtering, templates, and default items.

Basic Usage

The following example demonstrates the DropDownList in action.

@Component({
  selector: 'my-app',
  template: `
    <div class="example-wrapper">
      <p>T-shirt size:</p>
      <kendo-dropdownlist [data]="listItems">
      </kendo-dropdownlist>
    </div>
  `
})
class AppComponent {
    public listItems: Array<string> = ["X-Small", "Small", "Medium", "Large", "X-Large", "2X-Large"];
}

Configuration

Data Binding

The DropDownList enables you to bind data of primitive types such as strings and numbers as well as data inside objects. It also supports binding to an asynchronous source.

Bind to Arrays of Primitive Data

The following example demonstrates how to bind the DropDownList to an array of primitive data.

@Component({
  selector: 'my-app',
  template: `
    <kendo-dropdownlist [data]="listItems"></kendo-dropdownlist>
  `
})
class AppComponent {
    public listItems: Array<string> = ["Item 1", "Item 2", "Item 3"];
}

Bind to Arrays of Complex Data

When the component is bound to complex data (objects), define the textField and valueField properties. The DropDownList will extract the value and text values from the selected data item and in this way will set the selected value and text.

The following example demonstrates how to bind the DropDownList to an array of complex data.

@Component({
  selector: 'my-app',
  template: `
    <div class="example-wrapper">
      <p>T-shirt size:</p>
        <kendo-dropdownlist
            [data]="listItems"
            [textField]="'text'"
            [valueField]="'value'"
        >
    </kendo-dropdownlist>
    </div>
  `
})
class AppComponent {
    public listItems: Array<{ text: string, value: number }> = [
        { text: "Small", value: 1 },
        { text: "Medium", value: 2 },
        { text: "Large", value: 3 }
    ];
}

Bind to Remote Data

The following example demonstrates how to bind the DropDownList to remote data by using a service.

import { Component, OnInit } from '@angular/core';
import { Jsonp, JsonpModule } from '@angular/http';

import { DataService } from './data.service';

@Component({
  selector: 'my-app',
  template: `
    <kendo-dropdownlist [data]="listItems"
      [textField]="'ProductName'"
      [valueField]="'ProductId'"
      [defaultItem]="placeHolder" >
    </kendo-dropdownlist>
  `,
  providers: [DataService]
})

export class AppComponent {

    public listItems: Array<string> = [];
    public placeHolder: { ProductName: string, ProductId: number } = { ProductName: "Select product...", ProductId: null };


    constructor (private dataService: DataService) { }

    ngOnInit() {
      this.dataService.fetchData().subscribe(
      (data) => this.listItems = data
      )
    }
}
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { HttpModule, JsonpModule } from '@angular/http';
import { DropDownsModule } from '@progress/kendo-angular-dropdowns';

import { AppComponent }   from './app.component';

@NgModule({
  imports: [
    BrowserModule,
    HttpModule,
    JsonpModule,
    DropDownsModule
  ],
  declarations: [
    AppComponent
  ],
  bootstrap: [
    AppComponent
  ]
})
export class AppModule { }
import { AppModule } from './ng.module';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';

const platform = platformBrowserDynamic();
platform.bootstrapModule(AppModule);
export class Product {
    constructor(
        public ProductID?: number,
        public ProductName?: string,
    ) { }
}
import { Injectable } from '@angular/core';
import { Jsonp, JsonpModule } from '@angular/http';

@Injectable()

export class DataService {


  constructor( private jsonp: Jsonp) { }

  fetchData(action: string = "", data?: Product): Observable<Product[]>{
    return this.jsonp.get(`http://demos.telerik.com/kendo-ui/service/Products/${action}?callback=JSONP_CALLBACK${this.serializeModels(data)}`).map(response => response.json())
  }

  private serializeModels(data?: Product): string {
    return data ? `&models=${JSON.stringify([data])}` : '';
  }

}

Bind to Remote Data by Using the Async Pipe

The following example demonstrates how to bind the DropDownList to an asynchronous source.

import { Component } from '@angular/core';
import { Observable } from 'rxjs/Rx';
import { CategoriesService } from './categories.service';

@Component({
  providers: [CategoriesService],
  selector: 'my-app',
  template: `
      <kendo-dropdownlist
          [data]="view | async"
          [textField]="'CategoryName'"
          [valueField]="'CategoryID'"
        >
      </kendo-dropdownlist>
  `
})
export class AppComponent {
    constructor(private service: CategoriesService) {
        this.view = service;

        this.service.query();
    }

    private view: Observable<any>;
}
import { Injectable } from '@angular/core';
import { Http, HttpModule } from '@angular/http';

import { BehaviorSubject } from 'rxjs/Rx';

@Injectable()
export class CategoriesService extends BehaviorSubject<any> {
    constructor(private http: Http) {
        super(null);
    }

    public query(): void {
        this.fetch(this.tableName)
            .subscribe(x => super.next(x));
    }

    private BASE_URL: string = 'http://services.odata.org/V4/Northwind/Northwind.svc/';
    private tableName: string = "Categories";

    private fetch(tableName: string): any {
        const queryStr = `$skip=0&$count=true`;
        return this.http
            .get(`${this.BASE_URL}${tableName}?${queryStr}`)
            .map(response => response.json().value);
    }
}
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { HttpModule, JsonpModule } from '@angular/http';
import { DropDownsModule } from '@progress/kendo-angular-dropdowns';

import { AppComponent }   from './app.component';

@NgModule({
  imports: [
    BrowserModule,
    HttpModule,
    JsonpModule,
    DropDownsModule
  ],
  declarations: [
    AppComponent
  ],
  bootstrap: [
    AppComponent
  ]
})
export class AppModule { }
import { AppModule } from './ng.module';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';

const platform = platformBrowserDynamic();
platform.bootstrapModule(AppModule);

Stream Data by Using the Async Pipe

The DropDownList provides an option to bind it to asynchronous data (observables) by using the async pipe.

The following example demonstrates how to apply this behavior. It starts with an empty observable, produces one random value each second, and emits values in batches of five.

import { Observable } from 'rxjs/Observable';
import 'rxjs/add/observable/interval';
import 'rxjs/add/operator/bufferCount';

@Component({
  selector: 'my-app',
  template: `
    <div class="example-config">
      <p>The selected value will disappear when the new data is set.</p>
      <p>A new data will be available every 5 seconds (initially the DropDownList will be empty).</p>
    </div>
    <kendo-dropdownlist [data]="listItems | async"></kendo-dropdownlist>
  `
})
export class AppComponent {
  public listItems: Observable<string[]>;

  constructor() {
    this.listItems = Observable.interval(1000).map((x) =>  "New item " + x).bufferCount(5);
  }
}

Default Item

The defaultItem property type has to match the data type. For example, if the data property contains a list of objects, the defaultItem has to be defined as an object with the same textField and valueField as the data items.

The following example demonstrates how to define a defaultItem as a primitive value.

@Component({
  selector: 'my-app',
  template: `
    <kendo-dropdownlist
        [defaultItem]="'Select item...'"
        [data]="listItems"
        [valuePrimitive]="true"
    >
    </kendo-dropdownlist>
  `
})
class AppComponent {
    public listItems: Array<string> = ["Item 1", "Item 2", "Item 3"];
}

The following example demonstrates how to define a defaultItem as an object value.

@Component({
  selector: 'my-app',
  template: `
    <kendo-dropdownlist
        [defaultItem]="defaultItem"
        [data]="listItems"
        [textField]="'text'"
        [valueField]="'value'"
    >
    </kendo-dropdownlist>
  `
})
class AppComponent {
    public defaultItem: { text: string, value: number } = { text: "Select item...", value: null };

    public listItems: Array<{ text: string, value: number }> = [
        { text: "Small", value: 1 },
        { text: "Medium", value: 2 },
        { text: "Large", value: 3 }
    ];
}

Templates

To customize the list item, the selected value, the popup footer or header content, use the item, value, footer, or header template respectively.

Item Template

Use the item template to customize the content of every list item. To define an item template, nest a <template> tag with an kendoDropDownListItemTemplate directive inside a <kendo-dropdownlist> tag.

The template context is set to the current DropDownList component. To get a reference to the current data item, use the let-dataItem directive.

@Component({
  selector: 'my-app',
  styles: ['.template { display: inline-block; background: #333; color: #fff; border-radius: 50%; width: 18px; height: 18px; text-align: center; } '],
  template: `
    <kendo-dropdownlist
        [data]="listItems"
        [textField]="'text'"
        [valueField]="'value'"
        [value]="selectedValue"
        [valuePrimitive]="true"
    >
        <template kendoDropDownListItemTemplate let-dataItem>
            <span class="template">{{ dataItem.value }}</span> {{ dataItem.text }}
        </template>
    </kendo-dropdownlist>
  `
})
class AppComponent {
    public listItems: Array<{ text: string, value: number }> = [
        { text: "Small", value: 1 },
        { text: "Medium", value: 2 },
        { text: "Large", value: 3 }
    ];

    public selectedValue: number = 2;
}

Value Template

Use the value template to customize the element content that holds the selected text. To define a value template, nest a <template> tag with a kendoDropDownListValueTemplate directive inside a <kendo-dropdownlist> tag.

The template context is set to the current DropDownList component. To get a reference to the current data item, use the let-dataItem directive.

@Component({
  selector: 'my-app',
  styles: ['.template { display: inline-block; background: #333; color: #fff; border-radius: 50%; width: 18px; height: 18px; text-align: center; } '],
  template: `
    <kendo-dropdownlist
        [data]="listItems"
        [textField]="'text'"
        [valueField]="'value'"
        [value]="selectedValue"
    >
        <template kendoDropDownListValueTemplate let-dataItem>
            <span class="template">{{ dataItem?.value }}</span>&nbsp;{{ dataItem?.text }}
        </template>
    </kendo-dropdownlist>
  `
})
class AppComponent {
    public listItems: Array<{ text: string, value: number }> = [
        { text: "Small", value: 1 },
        { text: "Medium", value: 2 },
        { text: "Large", value: 3 }
    ];

    public selectedValue: { text: string, value: number } = { text: "Foo", value: 1 };
}

Header Template

Use the header template to customize the popup header element. To define a header template, nest a <template> tag with a kendoDropDownListHeaderTemplate directive inside a <kendo-dropdownlist> tag.

The template context is set to the current DropDownList component.

@Component({
  selector: 'my-app',
  styles: ['h4 { font-size: 1em; font-weight: bold; padding: 0 8px; }'],
  template: `
    <kendo-dropdownlist
        [data]="listItems"
        [textField]="'text'"
        [valueField]="'value'"
        [value]="selectedValue"
        [valuePrimitive]="true"
    >
        <template kendoDropDownListHeaderTemplate>
            <h4>T-shirt sizes</h4>
        </template>
    </kendo-dropdownlist>
  `
})
class AppComponent {
    public listItems: Array<{ text: string, value: number }> = [
        { text: "Small", value: 1 },
        { text: "Medium", value: 2 },
        { text: "Large", value: 3 }
    ];

    public selectedValue: number = 2;
}

Use the footer template to customize the popup footer element. To define a footer template, nest a <template> tag with a kendoDropDownListFooterTemplate directive inside a <kendo-dropdownlist> tag.

The template context is set to the current DropDownList component.

@Component({
  selector: 'my-app',
  styles: ['h4 { font-size: 1em; font-weight: bold; padding: 0 8px; }'],
  template: `
    <kendo-dropdownlist
        [data]="listItems"
        [textField]="'text'"
        [valueField]="'value'"
        [value]="selectedValue"
        [valuePrimitive]="true"
    >
        <template kendoDropDownListFooterTemplate>
            <h4>{{listItems.length}} sizes available</h4>
        </template>
    </kendo-dropdownlist>
  `
})
class AppComponent {
    public listItems: Array<{ text: string, value: number }> = [
        { text: "Small", value: 1 },
        { text: "Medium", value: 2 },
        { text: "Large", value: 3 }
    ];

    public selectedValue: number = 2;
}

No-Data Template

Use the no-data template to customize the popup content when no data is present. To define a no-data template, nest a <template> tag with a kendoDropDownListNoDataTemplate directive inside a <kendo-dropdownlist> tag.

@Component({
  selector: 'my-app',
  styles: ['.k-i-warning { font-size: 2.5em; } h4 { font-size: 1em;}'],
  template: `
    <kendo-dropdownlist
        [data]="listItems"
    >
        <template kendoDropDownListNoDataTemplate>
            <h4><span class="k-icon k-i-warning"></span><br /><br /> No data here</h4>
        </template>
    </kendo-dropdownlist>
  `
})
class AppComponent {
    public listItems: Array<{ text: string, value: number }> = [];
}

Value Selection

The DropDownList allows for defining its selected value as primitive (strings, numbers) or complex (objects). It depends on the valuePrimitive configuration option when to use which.

Specify the Value Type

To specify the value type, set the valuePrimitive property. By default, it is set to false—just like the defaultItem, the value has to match the data type. If the valuePrimitive property is set to true, the value has to be of the primitive type.

@Component({
  selector: 'my-app',
  template: `
    <kendo-dropdownlist
        [data]="listItems"
        [textField]="'text'"
        [valueField]="'value'"
        [value]="selectedObject"
    >
    </kendo-dropdownlist>
    <kendo-dropdownlist
        [data]="listItems"
        [textField]="'text'"
        [valueField]="'value'"
        [value]="selectedPrimitive"
        [valuePrimitive]="true"
    >
    </kendo-dropdownlist>
  `
})
class AppComponent {
    public listItems: Array<{ text: string, value: number }> = [
        { text: "Small", value: 1 },
        { text: "Medium", value: 2 },
        { text: "Large", value: 3 }
    ];

    public selectedObject: { text: string, value: number } = { text: "Medium", value: 2 };
    public selectedPrimitive: number = 2;
}

Set the Value Property Binding

It is possible to set the value of the DropDownList through its [value] property binding. The component accepts values of the complex (objects) or the primitive (strings or numbers) type. To specify the value type, set the valuePrimitive property. By default, it is set to false—just like the defaultItem, the value has to match the data type. When the value changes, the DropDownList triggers the valueChange event.

The following example demonstrates how to select an item by using primitive values.

@Component({
  selector: 'my-app',
  template: `
    <kendo-dropdownlist
        [data]="listItems"
        [textField]="'text'"
        [valueField]="'value'"
        [value]="selectedValue"
        [valuePrimitive]="true"
    >
    </kendo-dropdownlist>
  `
})
class AppComponent {
    public listItems: Array<{ text: string, value: number }> = [
        { text: "Small", value: 1 },
        { text: "Medium", value: 2 },
        { text: "Large", value: 3 }
    ];

    public selectedValue: number = 2;
}

The following example demonstrates how to select an item by using complex values.

@Component({
  selector: 'my-app',
  template: `
    <kendo-dropdownlist
        [data]="listItems"
        [textField]="'text'"
        [valueField]="'value'"
        [value]="selectedValue"
    >
    </kendo-dropdownlist>
  `
})
class AppComponent {
    public listItems: Array<{ text: string, value: number }> = [
        { text: "Small", value: 1 },
        { text: "Medium", value: 2 },
        { text: "Large", value: 3 }
    ];

    public selectedValue: { text: string, value: number } = { text: "Medium", value: 2 };
}

Forms Support

It is possible to use the DropDownList in template-driven or reactive forms. The component accepts values of the complex (objects) or the primitive (strings or numbers) type. To specify the value type, set the valuePrimitive property. By default, it is set to false—just like the defaultItem, the value has to match the data type.

Template-Driven Forms

The template-driven forms enable you to bind the DropDownList to the model by using the ngModel directive.

The following example demonstrates how to accomplish a two-way data binding by using the ngModel directive. The model field is a complex value.

@Component({
  selector: 'my-app',
  template: `
    <form #form="ngForm">
        <div class="example-config">
            The selected gender is <strong>{{ gender | json }}</strong>
        </div>
        <label>
            Select Gender:
            <kendo-dropdownlist
                name="gender"
                [data]="genders"
                [textField]="'text'"
                [valueField]="'value'"
                [(ngModel)]="gender"
            >
            </kendo-dropdownlist>
        </label>
    </form>
  `
})
class AppComponent {
    public genders: Array<{ text: string, value: number }> = [
        { text: "Male", value: 1 },
        { text: "Female", value: 2 },
        { text: "Other", value: 3 }
    ];

    public gender: { text: string, value: number } = { text: "Female", value: 2 };
}

The following example demonstrates how to accomplish a two-way data binding by using the ngModel directive. The model field is a primitive value.

@Component({
  selector: 'my-app',
  template: `
    <form #form="ngForm">
        <div class="example-config">
            The selected gender is <strong>{{ gender | json }}</strong>
        </div>
        <label>
            Select Gender:
            <kendo-dropdownlist
                name="gender"
                [data]="genders"
                [textField]="'text'"
                [valueField]="'value'"
                [valuePrimitive]="true"
                [(ngModel)]="gender"
            >
            </kendo-dropdownlist>
        </label>
    </form>
  `
})
class AppComponent {
    public genders: Array<{ text: string, value: number }> = [
        { text: "Male", value: 1 },
        { text: "Female", value: 2 },
        { text: "Other", value: 3 }
    ];

    public gender: { text: string, value: number } = 2;
}

Reactive Forms

The FormGroup provides a way to render reactive forms. For more details, refer to the Angular Documentation.

The following example demonstrates how to use the DropDownList in a reactive form with a primitive value binding.
 

import {
    FormsModule,
    ReactiveFormsModule,
    FormGroup,
    FormControl
} from '@angular/forms';

@Component({
  selector: 'my-app',
  template: `
    <form [formGroup]="myForm">
        <div class="example-config">
            <p>The form is valid: <strong>{{myForm.controls.gender.valid}}</strong></p>
            <p>The form.gender value is: <strong>{{myForm.controls.gender.value}}</strong></p>
        </div>
        <label>
            Select gender
            <kendo-dropdownlist
                formControlName="gender"
                [data]="genders"
                [(ngModel)]="gender"
                [defaultItem]="{ text: 'Select gender', value: null }"
                [textField]="'text'"
                [valueField]="'value'"
                [valuePrimitive]="true"
                required
            >
            </kendo-dropdownlist>
        </label>
    </form>
  `
})
class AppComponent {
    public genders: Array<{ text: string, value: number }> = [
        { text: "Male", value: 1 },
        { text: "Female", value: 2 }
    ];

    public gender: { text: string, value: number };

    public myForm: FormGroup = new FormGroup({
        gender: new FormControl()
    });
}

The following example demonstrates how to use the DropDownList in a reactive form with a complex value binding and required validation.

import { Component } from '@angular/core';
import { FormGroup, FormControl } from '@angular/forms';
import { requiredValidatorLogic } from './required.directive';

@Component({
  selector: 'my-app',
  template: `
    <form [formGroup]="myForm">
        <fieldset>
            The form.gender value is: <pre>{{myForm.controls.gender.value | json}}</pre>
            <br />
            The form is valid: {{myForm.controls.gender.valid}}
        </fieldset>
        <label>
            Select gender
            <kendo-dropdownlist
                isRequired="true"
                formControlName="gender"
                [data]="genders"
                [defaultItem]="{ text: 'Select gender', value: null }"
                [textField]="'text'"
                [valueField]="'id'"
            >
            </kendo-dropdownlist>
        </label>
    </form>
  `
})

export class AppComponent {
    public genders: Array<{ text: string, id: number }> = [
        { text: "Male", id: 1 },
        { text: "Female", id: 2 }
    ];

    public myForm: FormGroup = new FormGroup({
        gender: new FormControl({}, requiredValidatorLogic)
    });
}
import {
    forwardRef,
    Directive,
    Attribute
} from '@angular/core';

import {
    Validator,
    NG_VALIDATORS
} from '@angular/forms';

export const requiredValidatorLogic = (required) => (control) => {
    if (!control.value) return { valid: false }
    return control.value.id && control.value.id !== null ?
        null : { valid: false };
};

const Required_VALIDATOR: any = {
   provide: NG_VALIDATORS,
   useExisting: forwardRef(() => RequiredValidator),
   multi: true
};

@Directive({
     selector: '[isRequired]',
     providers: [Required_VALIDATOR]
})

export class RequiredValidator implements Validator {
    private _validator: any;
    constructor(@Attribute('isRequired') required: boolean) {
        this._validator = requiredValidatorLogic(required);
    }
    validate(c) {
        return this._validator(c);
    }
}
import { enableProdMode, NgModule } from '@angular/core';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { BrowserModule } from '@angular/platform-browser';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { DropDownsModule } from '@progress/kendo-angular-dropdowns';
import { AppComponent }   from './app.component';
import { RequiredValidator }   from './required.directive';

@NgModule({
    declarations: [ AppComponent, RequiredValidator ],
    imports: [ BrowserModule, FormsModule, ReactiveFormsModule, DropDownsModule ],
    bootstrap: [ AppComponent ]
})

export class AppModule { }

enableProdMode();

const platform = platformBrowserDynamic();
platform.bootstrapModule(AppModule);

The required built-in validator does not support object validation. If a defaultItem is set, the developer needs to implement the required custom validation, as demonstrated in the example.

Filtering

To enable the filtering functionality, set the filterable property to true. As a result, the component renders a filter input in the popup component. On every character input, the component triggers a filterChange event. The event argument contains the typed string value that you can use to filter the source.

@Component({
  selector: 'my-app',
  template: `
    <kendo-dropdownlist
        [data]="data"
        [filterable]="true"
        [textField]="'text'"
        [valueField]="'value'"
        (filterChange)="handleFilter($event)"
    >
    </kendo-dropdownlist>
  `
})
class AppComponent {
    public source: Array<{ text: string, value: number }> = [
        { text: "Small", value: 1 },
        { text: "Medium", value: 2 },
        { text: "Large", value: 3 }
    ];

    public data: Array<{ text: string, value: number }>;

    constructor() {
        this.data = this.source.slice();
    }

    handleFilter(value) {
        this.data = this.source.filter((s) => s.text.toLowerCase().indexOf(value.toLowerCase()) !== -1);
    }
}

Events

On Changing the Item Selection

The selectionChange event is triggered when the item selection is changed.

@Component({
  selector: 'my-app',
  template: `
    <div class="example-wrapper">
        <p>T-shirt size:</p>
        <kendo-dropdownlist
            [data]="data"
            [textField]="'text'"
            [valueField]="'value'"
            (selectionChange)="handleSelection($event)"
        >
        </kendo-dropdownlist>
    </div>
    <div class="example-config">
        <h4>Last 10 calls:</h4>
        <p *ngFor="let call of eventCalls">{{ call.name }}: <strong>{{ call.value | json }}</strong></p>
    </div>
  `
})
class AppComponent {
    public data: Array<{ text: string, value: number }> = [
        { text: "Small", value: 1 },
        { text: "Medium", value: 2 },
        { text: "Large", value: 3 }
    ];

    public eventCalls: Array<any> = [];

    last10Calls() {
        const end = this.eventCalls.length;

        return this.eventCalls.slice(Math.max(0, end - 10), end);
    }

    handleSelection(value) {
        this.eventCalls = this.last10Calls().concat([ { name: 'select', value: value } ]);
    }
}

On Changing the Value

The valueChange event is triggered when the selected value is changed. If the popup is open, the valueChange event will not fire. To raise the change event when the popup is still open, either blur the component or press ENTER.

@Component({
  selector: 'my-app',
  template: `
    <div class="example-wrapper">
        <p>T-shirt size:</p>
        <kendo-dropdownlist
            [data]="data"
            [textField]="'text'"
            [valueField]="'value'"
            (valueChange)="handleValue($event)"
        >
        </kendo-dropdownlist>
    </div>
    <div class="example-config">
        <h4>Last 10 calls:</h4>
        <p *ngFor="let call of eventCalls">{{ call.name }}: <strong>{{ call.value | json }}</strong></p>
    </div>
  `
})
class AppComponent {
    public data: Array<{ text: string, value: number }> = [
        { text: "Small", value: 1 },
        { text: "Medium", value: 2 },
        { text: "Large", value: 3 }
    ];

    public eventCalls: Array<any> = [];

    last10Calls() {
        const end = this.eventCalls.length;

        return this.eventCalls.slice(Math.max(0, end - 10), end);
    }

    handleValue(value) {
        this.eventCalls = this.last10Calls().concat([ { name: 'change', value: value } ]);
    }
}

On Changing the Filter

The filterChange event fires when the user types inside the filter input. For more details, refer to the section on filtering.

On Looping through Items

By default, it is possible to select a DropDownList item by pressing a keyboard key. For example, if the DropDownList items are Foo, Bar, and Baz, and the user presses the B letter key, the first of the DropDownList items, based on their alphabetical order, starting with a B will be selected.

The keyboard selection is available only if filtering is disabled.

In this article