I'm trying to get the list of the selected options from the following form in React.
<form onSubmit={ this.handleOptionsSelected.bind(this) }>
<div>
<select multiple>
{ this.getOptionList() }
</select>
</div>
<input type="submit" value="Select"/>
</form>
Here is my handleOptionsSelected implementation.
handleOptionsSelected(event) {
event.preventDefault();
console.log("The selected options are " + event.target.value);
}
However, I got undefined value for event.target.value.
Does someone know how to correct the code above?