Hi David,
Thank you for contacting Syncfusion Support.
Query: I need to use the autocomplete, but not filter on the text entered, while still passing the entered characters to the server to get suggestions. Such that the filtering occurs only on the server and not on the client side.
We have prepared a sample based on your requirement. Please check the below given link
In the above sample we have prevented default filtering action by setting preventDefaultAction as true in filtering event and performed filtering on enter key press during keypress event
|
public onFiltering= (e) => {
e.preventDefaultAction=true
};
public onkeyup=(e)=>{
if(e.key=="Enter")
{
let query = new Query();
// pass the filter input value thorugh query
query = ((<any>this.DDLObj).filterInput.value!= "") ? query.where("Game", "startswith", (<any>this.DDLObj).filterInput.value, true) : query;
//pass the query to filterAction method to filter data
(<any>this.DDLObj).filterAction(this.sportsData, query,(<any>this.DDLObj).fields)
}
}
|
Query: : Searching for a product, where the product name is in the autocomplete. Sometimes, a product with a name not in the entered search term. So if you search for aspirin, you could get "acetylsalicylic acid", but the internal filter filters "acetylsalicylic acid" out because it does not contain "aspirin".
Sorry , we are not clear about this requirement. Please confirm us whether you have “aspirin” as text and “acetylsalicylic acid” as value and you need to filter based on both text and value ? Else share us clear details on the requirement so that we can proceed further.
Regards,
Keerthana.