Skip to content
Merged
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,15 @@ import React, { Component, PropTypes } from "react";
import Select from "react-select";

class MultiSelect extends Component {
constructor(props) {
super(props);

this.state = {
value: props.value || []
};
}

handleOnChange(value) {
this.setState({
value
});

this.props.onChange(value);
}

render() {
return (
<Select
multi
simpleValue
value={this.state.value}
value={this.props.value}
placeholder={this.props.placeholder}
options={this.props.options}
onChange={this.handleOnChange.bind(this)}
onChange={this.props.onChange}
/>
);
}
Expand Down