Ionic 4 - debounce attribute of ion-searchbar does not work


#1

Hi everyone,

the attribute debounce of ion-searchbar doesn’t have any effect in ionic 4.

my code looks like:

<ion-searchbar
  (ionInput)="onSearchInput($event)"
  debounce="2000"
  ></ion-searchbar>

Does anyone know how to fix it?

Best regard.


#2

The ionInput is the problem, in ionic 4 the debounce effects ionChange, not ionInput.


#3

From the documentation:

debounce: Set the amount of time, in milliseconds, to wait to trigger the ionChange event after each keystroke.