This is a migrated thread and some comments may be shown as answers.

Combobox highlight item only with 'startWith' operator while filtering

1 Answer 108 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Shivali
Top achievements
Rank 1
Shivali asked on 31 Dec 2020, 08:57 AM

In my combobox while filtering it highlights the option considering the 'startWith' operator while I want to highlight the first option that comes after filtering using the 'contains' operator. 

I tried using kendoDropDownFilter directive and provided DropDownFilterSettings object to it as below

Html:

<kendo-combobox 
                [data]="items | async"
                [textField]="'name'"
                [valueField]="'id'"
                [valuePrimitive]="true"
                (valueChange)="valueChange($event)"
                [filterable]="true"
                (filterChange)="onFilter($event)"
                [kendoDropDownFilter]="filterSettings"
                (close)="$event.preventDefault()">

component.ts 

public filterSettings: DropDownFilterSettings = {
        caseSensitive: false,
        operator: 'contains'
    };

But this is not working.

 

1 Answer, 1 is accepted

Sort by
0
Hetali
Telerik team
answered on 31 Dec 2020, 05:38 PM

Hello Shivali,

Thank you for the information.

Upon replicating the issue described, the "contains" filter works as expected in the Kendo UI ComboBox with async data as seen in this StackBlitz example.

In order to help you resolve the issue, could you please update the StackBlitz example such that it replicates the behavior observed by you? I will then investigate.

Looking forward to your response.

Regards,
Hetali
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
ComboBox
Asked by
Shivali
Top achievements
Rank 1
Answers by
Hetali
Telerik team
Share this question
or