I have the following code with multiple select dropdown list. The handle change calls on selecting each value from the dropdown. How can i change this to call the handleChange function only after selecting the multiple values?
handleChange(e) {
console.log(e.target.value);
}
render() {
return(
<select className="form-control" key="1" name="degree" onChange={this.handleChange} multiple>
<option value="1" key="1">1</option>
<option value="2" key="2">2</option>
<option value="3" key="3">3</option>
<option value="4" key="4">4</option>
<option value="5" key="5">5</option>
</select>
)
}
Update: I need to get the array of selected values in the console is my basic requirement.