I'm sure this is a simple question, but actually I can't figure out, why it is not working. I'm still in beginner with react-redux, so please be patient with me. ;-)
I'm loading different data with react-redux. Now I want to fill a select box with the loaded values.
I can see the data is loaded correctly (props.anreden & props.benutzer). So I can be sure that the data is loaded correctly and I have error somewhere else.
The difference is that anreden is an obejct-array, while benutzer is an object.
When I want to fill the select box in the render() method, it fills only the data of benutzer and not of anreden:
This is the code of this part:
<div className="select">
<select
value={0}
className={`form-control tabable`}
>
<option value={0}>auswählen</option>
<option value={this.props.benutzer.id}>{this.props.benutzer.vorname}</option>
{this.props.anreden && this.props.anreden.length > 0 &&
this.props.anreden.map((option) => {
return (<option value={option.id}>{option.bezeichnung}</option>)
})}
</select>
</div>
Does anyone have a hint for me, why it is like this?


this.props.anredenare you sure its an array, you can verify using console.log<option value={option.id} key={option.id}>{option.bezeichnung}</option>