ng2-ui / auto-complete

Angular Auto Complete component and directive
http://ng2-ui.github.io/auto-complete/
MIT License
279 stars 124 forks source link

Not working when full matched string found in autosuggest #373

Open ittechy opened 5 years ago

ittechy commented 5 years ago

When we have full matched string hence it contains single result. So when we click on that full matched string from auto-suggest, it is not selecting that record hence not retrieving its data.

Example:

We have list of Cars => Volvo, Suzuki, BMW, Hyundai. Created one auto-suggest for car and tried to search : Suzuki (which is fully matched string), it returns result with Suzuki but when we try to select that record from auto-suggest list, it displays string as 'undefined'.

This is what we have set in html file. <input type="text" [min-chars]="3" auto-complete [(ngModel)]="CarName" name="CarName" [source]="autoSuggestCarName.bind(this)" [list-formatter]="carListFormatter" select-value-of="data" (valueChanged)="fillCarData($event)">

When we select fully matched record, 'fillCarData' method is called with $event : 'Suzuki' instead of json object. Our code is working fine in all other scenarios except this fully matched one.

Please provide your help on this. Thanks.

ajay560 commented 5 years ago

We are also facing the same issue. Will this issue be fixed. It's urgent for us.

@ittechy did you find any alternate/fix for this issue?