Gbuomprisco / ngx-chips

Tag Input component for Angular
MIT License
899 stars 361 forks source link

FormControl String Value #1013

Open elvispdosreis opened 2 years ago

elvispdosreis commented 2 years ago

Is it possible that I only receive a simple element in my formcontrol, I tested the add [onAdding] but I keep getting an object, I would like to receive only a string

 "emails": [
    "elvis@yahoo.com",
    {
      "display": "samra@yahoo.com",
      "value": "samra@yahoo.com"
    },
    {
      "display": "allen@yahoo.com",
      "value": "allen@yahoo.com"
    }
  ]
public transform(value: any): Observable<string> {
        return of(value.value);
 }
Gbuomprisco commented 2 years ago

Adding [modelAsString] should solve that. Check out the docs