add emails on format: John Johnson <john@john.com>
daggala opened this issue · comments
It's quite common in gmail and other mail clients that the emails are displayed with the names and then the email inside chevrons, like this: John Johnson john@john.com (see gmail screenshot below)
It would be great to be able to copy paste this kind of format in the textfield and keep the format when it transforms into a chip:
Pasteable example exactly how gmail supports it: Marsellus Wallace <marsellus@foo.com>, Winston Wolf <winston@foo.com>,
.
Maybe this lib could parse the input to a list of objects? [{firstName: 'Marsellus', lastName: 'Wallace', email: 'marsellus@foo.com'}, ...]
.
How will this component know the user's name? You would need an external service for that.
I would think that you could take the component onChange
event and create a lookup array with names. Then just create your own display component in getLabel
to match up the email (as the key) to your name lookup.
I was thinking the same. But, where do you get the full names? I guess a DB you build up somewhere?