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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Delay before triggering search

Thread ID:

Created:

Updated:

Platform:

Replies:

151263 Feb 5,2020 10:59 AM UTC Feb 6,2020 03:54 PM UTC Blazor 1
loading
Tags: AutoComplete
Rodrigo
Asked On February 5, 2020 05:22 PM UTC

Hello,

I have a couple of questions regarding the autocomplete.
  1. Is there any option to introduce a delay on the trigger to perform the search? Currently if I search for "cos" the adapter is triggering 3 times. But since I wrote "cos" quickly I would like to have a delay and only fire after a pause, for example of 300ms
  2. Is there a way to specify that a autocomplete only accepts numbers?
Edit:
      3. when we press enter on an autocomplete / textbox  component, its currently executing the submit of the form. How can I prevent this behavior from happening
       - (Resolved )4. Validation errors appear immediately when entering the form. Is there anything that can be done to prevent this?

Edit 2: 
5. How can I add html 5 tags on syncfusion components. For example on the autocomplete compoment I would like to disable the browser suggestions like autocomplete=off"


Regards,
Rodrigo

Sevvandhi Nagulan [Syncfusion]
Replied On February 6, 2020 03:54 PM UTC

Hi Rodrigo, 

Greetings from Syncfusion support. 

Query 1: Is there any option to introduce a delay on the trigger to perform the search? Currently if I search for "cos" the adapter is triggering 3 times. But since I wrote "cos" quickly I would like to have a delay and only fire after a pause, for example of 300ms 

You can use the MinLength property for delaying the server request. The search action will perform after typed minimum characters. 

<EjsAutoComplete TValue="string" @bind-Value="model.TestProperty" Placeholder="Select a customer" Query="@Query" MinLength="2"> 
            <EjsDataManager Url="https://services.odata.org/V4/Northwind/Northwind.svc/" Adaptor="Adaptors.ODataV4Adaptor" CrossDomain=true></EjsDataManager> 
            <AutoCompleteFieldSettings Value="ContactName"></AutoCompleteFieldSettings> 
        </EjsAutoComplete> 

Query 2: when we press enter on an autocomplete / textbox  component, its currently executing the submit of the form. How can I prevent this behavior from happening 
 
The form will be submitted only when the click the submit button. Kindly refer the below code example, 
 
 
<EditForm EditContext="@editContext"> 
    <DataAnnotationsValidator /> 
    <div class="form-group"> 
        <EjsAutoComplete TValue="string" @bind-Value="model.TestProperty" Placeholder="Select a customer" Query="@Query" MinLength="2"> 
            <EjsDataManager Url="https://services.odata.org/V4/Northwind/Northwind.svc/" Adaptor="Adaptors.ODataV4Adaptor" CrossDomain=true></EjsDataManager> 
            <AutoCompleteFieldSettings Value="ContactName"></AutoCompleteFieldSettings> 
        </EjsAutoComplete> 
        <ValidationMessage For="()=>model.TestProperty" /> 
    </div> 
    <EjsButton IsPrimary="true" HtmlAttributes="@(new Dictionary<string,object>{ { "type", "submit"} })">Save</EjsButton> 
</EditForm> 
 
 
Query 3: How can I add html 5 tags on syncfusion components. For example on the autocomplete compoment I would like to disable the browser suggestions like autocomplete=off" 

By default browser suggestion disabled in the autocomplete component. Kindly refer the below code, 

 

Please find the sample below, 

 
Regards, 
Sevvandhi N 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon