Add unique key prop to ansible select options

This commit is contained in:
Marliana Lara 2019-06-26 10:21:34 -04:00
parent f3bf35311e
commit a2a245c89e
No known key found for this signature in database
GPG Key ID: 38C73B40DFA809EE
2 changed files with 4 additions and 4 deletions

View File

@ -30,7 +30,7 @@ class AnsibleSelect extends React.Component {
>
{data.map((datum) => (
<FormSelectOption
key={datum.value}
key={datum.key}
value={datum.value}
label={datum.label}
isDisabled={datum.isDisabled}

View File

@ -38,9 +38,9 @@ class TemplateForm extends Component {
} = this.props;
const jobTypeOptions = [
{ value: '', label: i18n._(t`Choose a job type`), isDisabled: true },
{ value: 'run', label: i18n._(t`Run`), isDisabled: false },
{ value: 'check', label: i18n._(t`Check`), isDisabled: false }
{ value: '', key: '', label: i18n._(t`Choose a job type`), isDisabled: true },
{ value: 'run', key: 'run', label: i18n._(t`Run`), isDisabled: false },
{ value: 'check', key: 'check', label: i18n._(t`Check`), isDisabled: false }
];
return (