Closed asahu8 closed 7 years ago
is this the same question as this stackoverflow question?
<ng2-completer formControlName="captain" (selected)="onSelected($event)" [datasource]="captains" [minSearchLength]="0"></ng2-completer>
onSelected(event){ console.log('Event:', JSON.stringify(event)) }
Yeah something similar I did & it worked for me. Closing this.
With above code in UI it display the selected country's name in the UI and when the form is submitted it sends the same string.
I expect it to send the country object. In the UI on using "searchStr" instead of "searchStr.name" it submits the object. But in UI it displays [object Object].
Tried using ngValue but am not sure ng2-completer supports it or not. Please help!