Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

106
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!