Skip to content

Instantly share code, notes, and snippets.

@kaueDM
Created October 16, 2017 10:34
Show Gist options
  • Select an option

  • Save kaueDM/77f48e9c25f1641fbf05f416cbb5c50e to your computer and use it in GitHub Desktop.

Select an option

Save kaueDM/77f48e9c25f1641fbf05f416cbb5c50e to your computer and use it in GitHub Desktop.
<select
value={this.state.customer ? this.state.customer : 'Selecione...'}
onChange={e => this._handleSelect(e)}
>
{_.map(this.state.customerOptions, item => {
return (
<option key={item.uid} value={item.uid}> {item.company ? item.company : item.name} </option>
)
})}
</select>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment