Skip to content
Snippets Groups Projects
Unverified Commit b1ed2889 authored by Thomas Tracy's avatar Thomas Tracy Committed by GitHub
Browse files

Fix form auto-filling "prefer not to respond" (#25126)

An issue with 2 options having the same react child key. This makes the
keys more unique.
parent bac8f3ae
No related branches found
No related tags found
No related merge requests found
......@@ -87,7 +87,7 @@ class DemographicsCollectionModal extends React.Component {
loadOptions(field) {
const { choices } = get(this.state.options, field, { choices: [] });
if (choices.length) {
return choices.map(choice => <option value={choice.value} key={choice.value}>{choice.display_name}</option>);
return choices.map((choice, i) => <option value={choice.value} key={choice.value + i}>{choice.display_name}</option>);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment