We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents a504eeb + bf84c59 commit ea54504Copy full SHA for ea54504
src/components/Select2.js
@@ -52,9 +52,11 @@ export default class Select2 extends Component {
52
}
53
54
render() {
55
+ const { data, ...params } = this.props;
56
+
57
return (
- <select multiple={this.props.multiple} defaultValue={this.props.defaultValue}>
- {this.props.data.map((item, k) => {
58
+ <select {...params}>
59
+ {data.map((item, k) => {
60
if (typeof item === 'string' ||
61
((!!item && typeof item === 'object') && Object.prototype.toString.call(item) === '[object String]')) {
62
return (<option key={'option-' + k} value={item}>{item}</option>);
0 commit comments