import React from 'react'; import Formsy from 'formsy-react'; const MySelect = React.createClass({ mixins: [Formsy.Mixin], changeValue(event) { this.setValue(event.currentTarget.value); }, render() { const className = this.props.className + ' ' + (this.showRequired() ? 'required' : this.showError() ? 'error' : null); const errorMessage = this.getErrorMessage(); const options = this.props.options.map((option, i) => ( )); return (
{errorMessage}
); } }); export default MySelect;