Skip to content

Commit ea54504

Browse files
committed
Merge pull request #10 from czerasz/feature/add_class_name_support
Add support for className attribute
2 parents a504eeb + bf84c59 commit ea54504

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/components/Select2.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,11 @@ export default class Select2 extends Component {
5252
}
5353

5454
render() {
55+
const { data, ...params } = this.props;
56+
5557
return (
56-
<select multiple={this.props.multiple} defaultValue={this.props.defaultValue}>
57-
{this.props.data.map((item, k) => {
58+
<select {...params}>
59+
{data.map((item, k) => {
5860
if (typeof item === 'string' ||
5961
((!!item && typeof item === 'object') && Object.prototype.toString.call(item) === '[object String]')) {
6062
return (<option key={'option-' + k} value={item}>{item}</option>);

0 commit comments

Comments
 (0)