Rename AnsibleEnvironmentSelect to AnsibleSelect

- Update references to the component.
This commit is contained in:
kialam
2018-12-11 16:42:24 -05:00
parent 9c7d449a4d
commit 9627a73978
5 changed files with 5 additions and 5 deletions

View File

@@ -0,0 +1,36 @@
import React from 'react';
import {
FormGroup,
Select,
SelectOption,
} from '@patternfly/react-core';
class AnsibleSelect extends React.Component {
constructor(props) {
super(props);
this.onSelectChange = this.onSelectChange.bind(this);
}
onSelectChange(val, _) {
this.props.selectChange(val);
}
render() {
const hide = this.props.hidden;
if (hide) {
return null;
} else {
return (
<FormGroup label={this.props.labelName} fieldId="ansible-select">
<Select value={this.props.selected} onChange={this.onSelectChange} aria-label="Select Input">
{this.props.data.map((env, index) => (
<SelectOption isDisabled={env.disabled} key={index} value={env} label={env} />
))}
</Select>
</FormGroup>
);
}
}
}
export default AnsibleSelect;

View File

@@ -0,0 +1,3 @@
import AnsibleSelect from './AnsibleSelect';
export default AnsibleSelect;