Primeng: Multiple field for AutoComplete

Created on 25 Oct 2017  路  9Comments  路  Source: primefaces/primeng

[ ] bug report => Search github for a similar issue or PR before submitting
[x] feature request => Please check if request is not on the roadmap already https://github.com/primefaces/primeng/wiki/Roadmap
[ ] support request => Please do not submit support request here, instead see http://forum.primefaces.org/viewforum.php?f=35
```
Multiple field for "autoComplete" for example:

or

in two case show: name(space)lastname => Carlos Rojas (example)

*this is a suggestion, if exist other way (or better) to do this, its fine :D

thanks.

  • Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]

  • Language: [all | TypeScript X.X | ES6/7 | ES5]

  • Node (for AoT issues): node --version =

new feature

Most helpful comment

Any info regarding this item? It would be a very good addition!

All 9 comments

Any info regarding this item? It would be a very good addition!

Very need this feature, or custom template for single autocomplete

Any updates?

Up. We need this feature!!!

Any solutions or any updates?

Any udpates? We need this

any update?

We need it too.

I "solved" the problem in the following way, I hope it will help you until they implement the definitive option

HTML
<!-- **NOT set/put "field" attribute** -->
<p-autoComplete #customId [(ngModel)]="value" (onSelect)="select($event)" [suggestions]="suggestions" (completeMethod)="filter($event)">
<ng-template let-v pTemplate="item">
{{v.name}} {{v.lastname}} {{v.etc}}
</ng-template>
</p-autoComplete>

TS
@ViewChild('customId', {static: false}) auto:any;

select(v : any) {
let allFilds:string = v.name+' '+v.lastname.....
this.auto.inputFieldValue = allFilds.trim();
}

Was this page helpful?
0 / 5 - 0 ratings

Related issues

SchneMa picture SchneMa  路  3Comments

jisqaqov picture jisqaqov  路  3Comments

cyberrranger picture cyberrranger  路  3Comments

gatapia picture gatapia  路  3Comments

Faigjaz picture Faigjaz  路  3Comments