Hello
I’m fairly new to RedwoodJS and so far I really like it.
Right now I’m trying to get the SelectField form component to list the users which I get from a query.
<SelectField
name="executorId"
defaultValue={props.note?.executorId}
className="rw-input"
errorClassName="rw-input rw-input-error"
validation={{
required: true,
}}
>
{users.map((user) => (
<>
<option key={user.id} value={user.id}>
{user.name} ({user.email})
</option>
</>
))}
</SelectField>
The users get loaded correctly and they also are shown in the dropdown.
My problem is, that i get the following error:
Warning: Each child in a list should have a unique "key" prop.
I assigned a key value to each <option>
, am I missing something?
Thanks!