In my Angular 5 project, I have implemented PrimeNG dropdown (p-dropdown) and encountered an issue. When I try to filter the dropdown data by adding spaces before and after the search term, it displays a No Results Found message. How can I fix this problem?
For example, if I search for "India" with spaces surrounding the term in the country dropdown, the p-dropdown shows a No Results Found message.
My goal is to trim() the searched string in the PrimeNG p-dropdown filter.
Below is the HTML code for the p-dropdown:
<p-dropdown (onChange)="checkType(model.transectionType)" *ngIf="availableBalance != 0.00" (keydown)="onKeyUp($event)" [style]="{'width':'100%'}" [options]="transectionType" [filter] = "true"
[resetFilterOnHide] = "true" [(ngModel)]="model.transectionType"
[formControl]="form.controls['transectionType']" placeholder="Select a Transaction type"
optionLabel="value"></p-dropdown>