Advertisement
Guest User

Untitled

a guest
Nov 21st, 2014
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.   handleValueChange: function(e) {
  2.     if (e.val)
  3.       this.props.onChange(e);
  4.     else
  5.       this.props.onRemove && this.props.onRemove(e);
  6.   },
  7.   componentDidMount: function() {
  8.     component = this;
  9.  
  10.     var $select = $(this.refs.select.getDOMNode());
  11.     var select2 = $select.select2({
  12.       placeholder: this.props.emptyLabel,
  13.       allowClear: this.props.allowClear
  14.     }).on('change', this.handleValueChange);
  15.   },
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement