I have text box and assigned to it keyup
event a search function but I want it to happen with delay, not on every keypress
here is the html code :
<input type="text" [(ngModel)]="searchedKPI" (keyup)="searchConfigTree()">
and here is ts code :
list = list.filter(item => item.label.toLocaleLowerCase().includes(this.searchedKPI.toLocaleLowerCase())).slice();
and here is the example I wanted to search "text" string but the event happens 4 times, I want to this happens once only for "text" string :
what the solution?