Advertisement
Guest User

Untitled

a guest
Jan 17th, 2017
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. var FilterOptions = React.createClass({
  2. changeOption: function(type, e) {
  3. var val = e.target.value;
  4. this.props.changeOption(val, type);
  5. },
  6.  
  7. render: function() {
  8.  
  9. return (
  10. <div className="filter-options">
  11. <div className="filter-option">
  12. <select id="product" name="Product" value={this.props.product} onChange={this.changeOption.bind(this, 'product')}>
  13. <option value=''>Product</option>
  14. {this.props.productOptions.map(function(option) {
  15. return (<option key={option} value={option}>{option}</option>)
  16. })}
  17. </select>
  18. </div>
  19. </div>
  20. );
  21. }
  22. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement