Disable internal filter on Autocomplete

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.

IE: 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".

Thanks!

6 Replies

AQ arad qorbani June 16, 2018 06:20 PM UTC

I got the same problem, I see products but no filtering for search! it's styleup
p.s: on admin panel, it works perfectly but not in user panels


KR Keerthana Rajendran Syncfusion Team June 19, 2018 12:47 PM UTC

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. 



AQ arad qorbani replied to arad qorbani July 15, 2018 09:35 AM UTC

I got the same problem, I see products but no filtering for search! it's styleup
p.s: on admin panel, it works perfectly but not in user panels

why can't i read these words, ma colleague said he has same problem with autocomplete and now i even cannot enter


PO Prince Oliver Syncfusion Team July 16, 2018 12:47 PM UTC

Hi Arad, 

Thank you for contacting Syncfusion support. 

We were unable to get the issue you have reported, we need additional information on the issue you are facing. We prepared a sample to check the issue, kindly refer to the following  : https://stackblitz.com/edit/s7vnav-9am8vz  

Please share any screenshots or code explaining the issue in your end. it will help us provide solution. 

Regards, 
Prince 



AQ arad qorbani August 5, 2018 09:35 AM UTC

my issue got solved on the index page, now لوازم جانبی گوشی and ساعت هوشمند is missing


KV Karthikeyan Viswanathan Syncfusion Team August 6, 2018 12:07 PM UTC

Hi Arad,    
   
Sorry for this trouble.    
   
We were unable to find out the reported issue. We have checked your shared page. But, we didn’t find the EJ2 – AutoComplete in that page other than normal input.   
   
Please refer to the below screenshot:    
   
   
   
Please share the code explaining your issue or explain the scenario else share the screenshot. it will help us provide solution at earlier.    
   
Regards,   
Karthikeyan V.   



Loader.
Up arrow icon