We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

AutoCompleteComponent - Keydown event

Hi Team,

I need the keydown event for AutoCompleteComponent, for auto populating the items which are to be fetched from the databass based on user enter.

And fetched data is stoted in state variable clients.  

Below is the code snippet.

The OnKeyDown is written in below code. However, it is not triggered. 

<AutoCompleteComponent id="search-client" 
dataSource={this.state.clients} ref={(autocomplete=> { this.searchClient = autocomplete; }}
fields={value'Name' }} popupHeight="250px" placeholder="Search Group/Company" autofill={true} filterType='StartsWith' />

Please kindly suggest me solution.

Many Thanks,

1 Reply

SN Sevvandhi Nagulan Syncfusion Team December 19, 2019 04:54 AM UTC

Hi Sinchan 
Greetings from Syncfusion support. 
We have checked the reported requirement. We would like to inform you that we have filtering event which will be triggered for the every keydown action. Kindly refer the below code, 
<AutoCompleteComponent id="games" dataSource={this.sportsData} ref={(AutoComplete) => { this.listObj = AutoComplete; }} placeholder="e.g. Australia" fields={this.fields} filtering={this.onFiltering.bind(this)} /> 
Please refer the below sample, 
Please find the UG documentation link below, 
Sevvandhi N  

Live Chat Icon For mobile
Up arrow icon