Remove autocomplete

In our odata grid, we are trying to disable this autocomplete. We don't want it to pre-fill that red suggestion.

Image_9067_1698855880625

We have already set [autofill]='false' in the ejs-grid element, but that did nothing. Additionally, we used this function, bound to the actionComplete event, to remove the autocomplete element, but still the autocomplete remains.

  public disableAutocomplete(event: any, grid: GridComponent ): void {
    if (event.requestType === 'filterafteropen') {
      const filterDialog = grid.element.querySelector('.e-filter-popup');
      const autoCompleteElements = Array.from(filterDialog.querySelectorAll('.e-autocomplete'));
      for (const element of autoCompleteElements) {
        element.classList.remove('e-autocomplete');
      }
    }
  }

1 Reply

RR Rajapandi Ravi Syncfusion Team November 6, 2023 01:55 PM UTC

Hi Phil,


Greetings from Syncfusion support


By default, in our EJ2 Grid, in the filter menu we have rendered the AutoComplete component. Since you don’t want the AutoComplete behavior in the filter menu, we suggest you render the TextBox component in the filter to achieve your requirement.


We can render the custom component in the Filter Menu. The column.filter.ui is used to add custom filter components to a particular column. We have already discussed your requirement in our documentation, and we suggest you render the TextBox component to achieve your requirement. Please refer the below documentation for more information.


Documentation: https://ej2.syncfusion.com/angular/documentation/grid/filtering/filter-menu#custom-component-in-filter-menu


TextBox: https://ej2.syncfusion.com/documentation/textbox/getting-started


Regards,

Rajapandi R


Loader.
Up arrow icon