forked from folio-org/stripes-components
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSelection.js
36 lines (30 loc) · 834 Bytes
/
Selection.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/* API entry for single-single select and multi-select fields... basically a props pass-through. */
import React from 'react';
import PropTypes from 'prop-types';
import SingleSelect from './SingleSelect';
// import MultiSelect from './MultiSelect';
const propTypes = {
emptyMessage: PropTypes.string,
formatter: PropTypes.func,
input: PropTypes.object,
label: PropTypes.string,
labelIsValue: PropTypes.bool,
listMaxHeight: PropTypes.string,
meta: PropTypes.object,
multiple: PropTypes.bool,
name: PropTypes.string,
tether: PropTypes.object,
};
const defaultProps = {
multiple: false,
};
class Selection extends React.Component {
render() {
return (
<SingleSelect {...this.props} />
);
}
}
Selection.defaultProps = defaultProps;
Selection.propTypes = propTypes;
export default Selection;