Hello 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 wich 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 duno what it is or were it is from. I duno if i get this problem sincei create the options with the map. Anyone know what i am doing wrong?