I need to clear the selected value of select dropdown as soon as user focus on the select element. I have used the below code but cant figure out what property of select do I need to reset.
<select name="select1" onChange={this.onChangeOption} onFocus={this.handleFocus}>
<option value=''>Please select...</option>
<option value='A'>A</option>
<option value='B'>B</option>
<option value='C'>C</option>
<option value='D'>D</option>
</select>
handleFocus(event) {
event.target.select(); // it did not work!!
}
I want the selected value to be Please select... when the user focuses on the element.