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

Kendo react autocomplete highlights best match in search result

2 Answers 180 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Prajakta
Top achievements
Rank 1
Prajakta asked on 14 Mar 2019, 06:49 AM

 

Hi,

 I am using Kendo react autocomplete search box in our project. (import { AutoComplete } from "@progress/kendo-react-dropdowns";)

 Whenever user starts typing in search textbox its shows best match from results highlight with box border. I want to remove this heighlight from best match which in middle of search result and  when user starts navigating using keyboard it should start from 1st item in search results. Is there any way to achieve this ?

Also for filter I am using operator: "contains", Is there any way to order result of filter as best match on top and then rest of matches.

 

2 Answers, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 14 Mar 2019, 10:25 AM
Hello, Prajakta,

This can be achieved by setting the internal state of the AutoCompelete focused index to be the first found element on the onChage event.

I made an example demonstrating this:

https://stackblitz.com/edit/react-8wkfgr-it6u5m?file=app/main.js

I hope this will help to achieve the desired result.

Regards,
Stefan
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Prajakta
Top achievements
Rank 1
answered on 15 Mar 2019, 07:28 AM

Hi Stefan,

Thank you for solution. This worked for me. 

Tags
General Discussions
Asked by
Prajakta
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Prajakta
Top achievements
Rank 1
Share this question
or