Skip to content

Instantly share code, notes, and snippets.

@scriptpapi
Created June 18, 2020 19:48
Show Gist options
  • Save scriptpapi/41fc9058635718b2f067512bf496f789 to your computer and use it in GitHub Desktop.
Save scriptpapi/41fc9058635718b2f067512bf496f789 to your computer and use it in GitHub Desktop.
React Material UI Select Component
const Select = () => {
return (
<FormControl style={NewUserStyles.Input}>
<InputLabel error={this.state.Error_Industry}>Industry</InputLabel>
<Select value={this.state.Industry}
error={this.state.Error_Industry}
onChange={(e) => {this.setState({Industry: e.target.value})}}
>
{
Industries.map((item) => {
return(
<MenuItem value={item.Value}>{item.Label}</MenuItem>
)
})
}
</Select>
</FormControl>
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment