Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

108
Vistas
ng-select search function not showing any result

I am using angular cli version - 11.2.8 and using the ng-select version of 7.3. Currently, I am able to render the UI as expected but when I tried to search in the input box inside the select element, it didn't search anything. I look for the issue in the package detail of NPM itself then have a list of versions which are compatible with different kinds of angular CLI version. Looks like I am using the correct version, still ng-select not working as properly.

<ng-select [(ngModel)]="selectedCars">
   <ng-option *ngFor="let car of cars" [value]="car.id">{{car.name}}</ng-option>
</ng-select>

 selectedCars = 3; //i also used selectedCars =[3], and selectedCars ="3", but it didn't work
  cars = [
    { id: 1, name: 'Volvo' },
    { id: 2, name: 'Saab'},
    { id: 3, name: 'Opel' },
    { id: 4, name: 'Audi' },
];

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

please try below code hope it will solve your problem

<ng-select [items]="cars" bindLabel="name" bindValue="id [(ngModel)]="selectedCars"> </ng-select>

for more detail please check the example https://stackblitz.com/run?file=src%2Fdata-source-array-example.component.html

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda