im using a reduction reaction form. Fields and I have drop classes. I can select any class from the drop-down list. but the problem is that when I ever select any value (class) from the drop-down list, I want to call the onChange action. when I run the action with the change change drop-down values, it doesnโt install and does not display the selected value. im using the following lines of code
<Field name="class._id" component="select" className="form-control" onChange={this.onChange.bind(this)} >
<option value="">Select class...</option>
{this.props.classes.map(Class =>
<option value={Class._id} key={Class._id} >{Class.name}</option>)}
</Field>
here is the onChange function
onChange(){
console.log(" Triggered")
}
If I do not set the onChange event, then my drop-down menu performs the correction and correctly displays the selected value with the correct text. but I want to call a function whenever you select any value