Vulcan/packages/vulcan-ui-bootstrap/lib/components/forms/SelectMultiple.jsx

21 lines
650 B
React
Raw Normal View History

import React from 'react';
import { intlShape } from 'meteor/vulcan:i18n';
2019-01-26 21:21:09 +09:00
import Form from 'react-bootstrap/lib/Form';
2019-01-24 18:01:53 +09:00
import { Components, registerComponent } from 'meteor/vulcan:core';
const SelectMultipleComponent = ({ refFunction, inputProperties, itemProperties }, { intl }) => {
inputProperties.multiple = true;
return (
<Components.FormItem {...inputProperties} {...itemProperties}>
<Form.Control as="select" {...inputProperties} ref={refFunction} />
</Components.FormItem>
);
};
SelectMultipleComponent.contextTypes = {
intl: intlShape,
};
registerComponent('FormComponentSelectMultiple', SelectMultipleComponent);