Possibility to opt-out of automatic selection

Currently, the first item in the autocomplete list is automatically selected, and pressing enter will choose the first suggestion in the list. This becomes an issue if using the SfAutocomplete control as a search entry, as it would not allow a user to enter free text that is not one of the suggested autocomplete items.

Is it possible to opt-out of this automatic selection, so that a user can enter text in the input field and press enter without an item being selected?

I have tried using the SearchBehavior property to achieve this without success, as for example returning -1 from GetHighlightIndex leads to some strange behavior like the text input clearing it's value on keyboard selection in the list and subsequent text input not updating the autosuggestion results.

Attached zip with video and sample project.


Attachment: SfAutomcomplete_20250704_100441_c5b8dd12.zip

2 Replies

KP Kamalesh Periyasamy Syncfusion Team July 9, 2025 01:16 PM UTC

Hi Lucas, 

Thank you for the detailed update and for sharing the sample project and video. We 
understand the concern regarding automatic selection and the challenges with using SearchBehavior and GetHighlightIndex. 
 
We’re currently evaluating the behavior related to item highlighting and the unexpected clearing of input when navigating the suggestion list. Our team is actively exploring possible solutions in sample level to allow free-text entry without automatic selection. 
 
We’ll share our findings with you by July 10th, 2025, and we appreciate your patience while we work through this. 

 

Regards, 

Kamalesh P 




KP Kamalesh Periyasamy Syncfusion Team July 10, 2025 01:49 PM UTC

Hi Lucas,


We’ve reviewed the shared sample, and to address the item highlight issue, we recommend setting the SelectedDropDownItemBackground to Transparent, which prevents visual highlighting. 
 
To restrict item selection when pressing the Enter key, we’ve used the Windows native PreviewKeyDown event to detect the Enter key and applied a boolean flag to cancel the selection using e.Cancel = true inside the SelectionChanging event. 
 
To assist you further, we’ve modified your sample and attached it below. Kindly test it and let us know if this resolves your issue. 


Regards, 

Kamalesh P 


Attachment: AutocompleteSample_(2)_f1f2d1ff.zip

Loader.
Up arrow icon