Get Selected option attribute in React
问题 I want to get attribute from my select option list. In meanwhile my code is like below : var Billing = React.createClass({ getInitialState() { return { associations: [], value: '', associationsList: '1' }; }, handleChange(event) { this.setState({value: event.target.value}); }, handleOption(event){ var option = event.target.getAttribute('data-id'); this.setState({associationsList: option}); }, render() { var listAssociations = this.state.associations.map(function(index){ return ( <option