Vulcan/packages/vulcan-ui-bootstrap/lib/components/forms/Select.jsx
Erik Schannen 150d9392e7 Changes to SmartForm behaviour - refactoring
- Added new `FormComponent.isCustomInput` method
 - Pulled `renderComponent` up from `FormComponentInner` to `FormComponent`
 - Pulled some input-type-specific logic up when it was universal, or pushed it down when it should be handled by each ui library
2018-05-10 10:03:59 -04:00

21 lines
644 B
JavaScript

import React from 'react';
import { intlShape } from 'meteor/vulcan:i18n';
import { Select } from 'formsy-react-components';
import { registerComponent } from 'meteor/vulcan:core';
const SelectComponent = ({refFunction, inputProperties, ...properties}, { intl }) => {
const noneOption = {
label: intl.formatMessage({ id: 'forms.select_option' }),
value: '',
disabled: true,
};
inputProperties.options = [noneOption, ...inputProperties.options];
return <Select {...inputProperties} ref={refFunction}/>
};
SelectComponent.contextTypes = {
intl: intlShape,
};
registerComponent('FormComponentSelect', SelectComponent);