import React from 'react'; import { withFormsy } from 'formsy-react'; class MySelect extends React.Component { changeValue = (event) => { this.props.setValue(event.currentTarget.value); } render() { const className = 'form-group' + (this.props.className || ' ') + (this.props.showRequired() ? 'required' : this.props.showError() ? 'error' : ''); const errorMessage = this.props.getErrorMessage(); const options = this.props.options.map((option, i) => ( )); return (
{errorMessage}
); } } export default withFormsy(MySelect);