Currently, I am encountering an issue with the ng-select functionality in my Angular CLI version 11.2.8 project. Despite using ng-select version 7.3 and ensuring compatibility with the Angular CLI version, the search functionality within the select element is not working as expected. I have verified the compatibility of versions through NPM package details, but the issue persists. Here is a snippet of my code:
<ng-select [(ngModel)]="selectedCars">
<ng-option *ngFor="let car of cars" [value]="car.id">{{car.name}}</ng-option>
</ng-select>
selectedCars = 3; // I have tried different formats like selectedCars =[3] and selectedCars ="3", but to no avail
cars = [
{ id: 1, name: 'Volvo' },
{ id: 2, name: 'Saab'},
{ id: 3, name: 'Opel' },
{ id: 4, name: 'Audi' },
];