Declined
Last Updated: 31 Aug 2023 15:15 by ADMIN
Musashi
Created on: 28 Jul 2021 23:28
Category: MultiSelect
Type: Feature Request
0
Selecting custom value instead of data on Enter

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

  1. Type "sm" in the MultiSelect and hit Enter
  2. "Small" is automatically selected, valueNormalizer is not hit at all

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

2 comments
ADMIN
Martin Bechev
Posted on: 31 Aug 2023 15:15

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

Stay tuned by visiting our public roadmap and feedback portal pages! Or perhaps, if you are new to our Kendo family, check out our getting started resources
ADMIN
Martin Bechev
Posted on: 04 Aug 2021 09:05

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/.