Skip to content

Not working when full matched string found in autosuggest #373

@ittechy

Description

@ittechy

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions