Grid: Search on each key stroke

FYI - from here: https://ej2.syncfusion.com/vue/documentation/grid/searching#search-on-each-key-stroke

Event is deprecated.   Is there a new method to do this same action?





1 Reply

PS Pavithra Subramaniyam Syncfusion Team April 11, 2023 11:25 AM UTC

Hi Verum Genus,


We suggest you use the KeyBoardEvent argument to overcome the reported error. Please refer to the below code example.


document

  .getElementById(grid.element.id + '_searchbar')

  .addEventListener('keyup', (evt: KeyboardEvent) => {

    grid.search((evt.target as HTMLInputElement).value);

  });

 


Loader.
Up arrow icon