0

I would like to have an ng-select which allows only numbers while typing/search as it is used only for Year field

<ng-select class="single" [items]="years" [multiple]="false" bindLabel="name" #select >

Do we have a way to control what user can type ?

Naresh217
  • 410
  • 1
  • 6
  • 19

1 Answers1

0

You can check by the ng-select output (search)="myListenerFunction($event)" this will catch an object who look like

{
   term: string, 
   items: yourObject[]
}

term is what the user serch and item the result of the search.

You can see it there: https://ng-select.github.io/ng-select#/events