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
close icon

TextBoxComponent AutoComplete Issue

Hi

I have a problem.

Please tell me that why cant turn autoComplete off for syncfussion input component. 

For example i have grid component when try to filter column filter input not empty. why its happens. 

Look at zip please


Attachment: evidenceOfInput_636c7fc4.rar

3 Replies

RS Rajapandiyan Settu Syncfusion Team October 24, 2022 01:04 AM

Hi Yahya,


Thanks for contacting Syncfusion support.


By default, we have used AutoComplete control to filter the string-type columns in the Filter-Menu. If you don’t want to show the popup while type a value in the AutoComplete control. You can achieve this by using the following CSS.


 

    <style>

      .e-ddl.e-popup.e-popup-flmenu.e-lib.e-control.e-popup-open {

        display: none;

      }

    </style>

 


If you want to avoid autofill value in the AutoComplete control, you can achieve this by using following code in the actionComplete event of Grid.


actionComplete: https://ej2.syncfusion.com/react/documentation/api/grid/#actioncomplete

autofill: https://ej2.syncfusion.com/javascript/documentation/api/auto-complete/#autofill


 

function actionComplete(args) {

  if (args.requestType == 'filterafteropen') {

    if (args.filterModel.dlgDiv.querySelector('.e-autocomplete')) {

      // disable the autofill action

      args.filterModel.dlgDiv.querySelector( '.e-autocomplete').ej2_instances[0].autofill = false;

    }

  }

}

 


Still, if you face the same issue, Kindly share the below details to validate further.


  1. Share the complete code files and package.json file.
  2. Did you use filter template in the Grid column?
  3. Share the video demo of the reported problem.
  4. If possible, share the issue reproducible sample which will be very helpful for us.


Regards,

Rajapandiyan S



YA Yahya Alatas October 24, 2022 04:09 AM

It work for grid filter input. But for Grid search input and other input doesnt work. 

Please tell me that how can disable autoFill for those input. 

Thanks


Attachment: GridSearchAndNormalInputImage_d4fe8d37.rar


RS Rajapandiyan Settu Syncfusion Team October 26, 2022 08:19 AM

Hi Yahya,


Thanks for your update.


By using the following code in the dataBound event, you can turn to autocomplete off for Grid’s searchbar element.


dataBound: https://ej2.syncfusion.com/react/documentation/api/grid/#databound

 

  function dataBound(args) {

     // get the search element using its id

    var searchEle = gridInstance.element.querySelector('#' + gridInstance.element.id + '_searchbar');

    if (searchEle) {

      searchEle.autocomplete = 'off'; // turn autocomplete off

    }

  }

 


Sample: https://stackblitz.com/edit/react-x7d7d9?file=index.js


Kindly share the below details to proceed with your requirement further.


  1. Share the complete Grid code file (highly recommended).
  2. What are the features you have used in the Grid?
  3. Share the input fields used in the Grid component with screenshot.

Regards,

Rajapandiyan S


Loader.
Live Chat Icon For mobile
Up arrow icon