Skip to content

Instantly share code, notes, and snippets.

@thomasJang
Created November 23, 2018 04:57
Show Gist options
  • Select an option

  • Save thomasJang/b9f237059f1c509347aa4b4dea6b686b to your computer and use it in GitHub Desktop.

Select an option

Save thomasJang/b9f237059f1c509347aa4b4dea6b686b to your computer and use it in GitHub Desktop.
sample.jsx
<ReactMultiEmail
placeholder="Input your email"
emails={emails}
onChange={(_emails: string[]) => {
this.setState({ emails: _emails });
}}
getLabel={(
email: string,
index: number,
removeEmail: (index: number) => void,
) => {
return (
<div data-tag key={index}>
{email}
<span data-tag-handle onClick={() => removeEmail(index)}>
×
</span>
</div>
);
}}
suffixDomains={['gmail.com', 'naver.com', 'daum.net']}
/>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment