Reputation: 5719
I use the module in my Angular 5 application:
My use case is that the user gives in a search term and I load search results from backend concerning to the user input. I can not find an event which fires when user gives in characters. Does anyone know which event I can use or how I can do this
Upvotes: 11
Views: 3293
Reputation: 23
<ng-select
placeholder="Select some items"
[items]="items"
[(ngModel)]="selectedItems"
bindLabel="name"
bindValue="id"
(search)="onSearch($event)"
</ng-select>
onSearch(event:any){
console.log(event)
}
Upvotes: 0
Reputation: 162
I think that the keyup event is what you are looking for.
You can read more about it here.
Upvotes: 3