Hi,
We are using the kendo-combbox to display the list of item that is retrieved from the backend server.
Please see an example in https://stackblitz.com/edit/angular-wb3zbjqs?file=src%2Fapp%2Fapp.component.ts
When we enter Pah it defaults to PAH (all uppercase). Is there anyway to achieve this?
Here is the data passed to the combobox.
export class AppComponent {
public allowCustom = true;
public selectedValues: string = 'Baseball';
public listItems: Array<string> = [
'Baseball',
'Basketball',
'Cricket',
'Field Hockey',
'Football',
'Table Tennis',
'Tennis',
'Volleyball',
'PAH',
'PaH',
'Pah',
];
}
Regards,
Jyothi
Hi Jyothi,
Thank you very much for the code snippet provided.
From what I understand from your question, you are currently utilizing the Kendo UI for Angular ComboBox and are experiencing issues when typing some text inside the component, as it ignores the casing of the items. Please, let me know if I misinterpreted the requirement.
Generally speaking, the ComboBox focuses/highlights the first occurrence that matches the user input in the internal <input> element of the component(in this case, PAH), disregarding the casing, and this is indeed the expected behavior of the widget.
What I would suggest in order to ensure that the ComboBox complies with the casing of the user input(lower or upper case) would be to utilize the built-in filtering functionality:
Using this feature would allow the developer to configure the component to respect the casing of the user input and show the items that match it. To better illustrate the suggested approach, I am sending you below two StackBlitz demos that implement it:
In case none of the provided information helps you achieve the desired behavior for the ComboBox, I would ask you to provide more detailed information about the expected result. This would allow me to gain a better understanding of the exact scenario and thus come up with a more suitable suggestion.
I hope the provided information helps. Please, let me know if I am missing out on something.
Regards,Georgi
Progress Telerik