Currently, given a multiselect with some data and allowCustom = true, if the user types "sm" and hits Enter, the control finds the first item in data that starts with "sm" and automatically selects that.
Repro: https://stackblitz.com/edit/angular-buffxv?file=app/app.component.ts
Looking at the code for the MultiSelect, the auto selection seems to happen because of findIndex(text, startsFrom = 0); the offending line: text && itemText.startsWith(text);
Ideally, the MultiSelect should give me a hook to determine what item is selected. Maybe hit valueNormalizer on Enter
Hi Musashi,
While the feature request is still valid, we are declining this request due to low interest and demand.
If it turns out to be popular in the future, we will reconsider the status.
Regards,
Martin
Progress Telerik
Hi Musashi,
Thank you for the provided feedback.
We will track the customer demand for this enhancement and consider implementing it in the future based on the interest.
In general, the MultiSelect component automatically focuses the first match from the list when allowCustom is set to true, and this is the default behavior of the widget.
In order to customize the focused item programmatically, the developer can utilize the focusItemAt built-in method and highlight the desired item in the list.
Here is an example where the method is used in input event handler and always focuses the first (custom) item:
https://stackblitz.com/edit/angular-unczc4
Regards,
Martin
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/.