I have this select component
<select
value={(this.state.selectedVersion)}
disabled={(this.state.versionDisable)}
onChange={this.handleVersionChange}
>
<option disabled hidden>Välj version</option>
{
this.state.versions.map((object, i) => {
return (
<option key={i} value={object}>
{object.text}{object.lastModified}
</option>
)
})
}
</select>
here I want the onChange event to take the options value which I have logged is the thing I want and use it as value but when I send it to my onChange handler
handleVersionChange(event){
console.log(event);
this.setState({selectedVersion: event.target.value});
console.log(this.state.selectedVersion);
}
The first console.log that logs the event that got sent I get some proxy object that I don't know what it is or were it is from. I don't know if I get this problem since I created the options with the map. Anyone know what I am doing wrong?