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

Removing Focus from First Item Upon Filtering in Kendo UI ComboBox for Angular

Environment

ProductProgress® Kendo UI for Angular ComboBox

Description

How to remove the focus from the first item when filtering the Kendo UI for Angular ComboBox?

Solution

To remove the focus from the first item in the ComboBox upon filtering, follow these steps:

  1. Handle the filterChange event of the ComboBox.

    html
    <kendo-combobox
      #combobox
      (filterChange)="handleFilter($event)"
    >
    </kendo-combobox>
  2. To remove the focus from the first item in the list, use the focusItemAt method inside a setTimeout function.

    ts
    @ViewChild('combobox') public combobox;
    public handleFilter(value) {
      setTimeout(() => {
        this.combobox.focusItemAt();
      });
    }

The following example demonstrates the full implementation of the suggested approach.

Change Theme
Theme
Loading ...
In this article
EnvironmentDescriptionSolution
Not finding the help you need?
Contact Support