Skip to content

Instantly share code, notes, and snippets.

@tomwagner
Last active May 13, 2019 08:18
Show Gist options
  • Select an option

  • Save tomwagner/ad556e667f2d44af518bb2ce65d1429b to your computer and use it in GitHub Desktop.

Select an option

Save tomwagner/ad556e667f2d44af518bb2ce65d1429b to your computer and use it in GitHub Desktop.
const x = ['test', 'test2', 'test3']
<CmxSelect
id="role"
required
label="Role"
placeholder="Select role2"
onChange={(e: any) => console.log('select, onChange')}
>
{x.map((role, i) => (
<CmxSelectOption key={`role-${role}`} value={i}>
{role}
</CmxSelectOption>
))}
</CmxSelect>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment