title: create a dropdown in react to show/hide fetch data based on object class
body: <p>Currently I am calling the Riot Games api and displaying all the champions. I have added a filter by name section, but i would like to add a dropdown to sort by champion class. On initial page load I want every champion rendered (which it currently does), but then selecting a class from the dropdown only show the champs that have that class. I can show each champions class with 
  <code>{champion.table.tags}</code>
   and adding the index number or numbers and this is what i want to be able to sort by. If <code>{champion.table.tags[0}</code> or <code>{champion.table.tags[1}</code> = "Fighter" for example. I would like every champion with a tag of "Fighter" to be shown when "Fighter" is selected in the dropdown</p>
  
  <p>I'm pretty new to react and I have built this same feature in Rails without any problem, but I'm struggling with the React way of going about this.</p>
  
  <p>my current code that shows all champs and has a sort function</p>
  
  <pre><code>import React, { Component } from 'react';
  import { Link } from 'react-router';
  import _ from 'lodash';
  
  class Champions extends Component {
    constructor(props) {
      super(props);
  
      this.state = {
        champions: []
      };
    }
  
    componentWillMount() {
      fetch('http://localhost:3000/champ.json')
      .then(response =&gt; response.json())
      .then(champions =&gt; {
        this.setState({ champions })
      })
    }
  
    filter(e){
      this.setState({ filter: e.target.value} )
    }
  
    render() {
      let champions = this.state.champions;
      console.log('champions: ', champions);
  
      if(this.state.filter){
        champions = champions.filter( champion =&gt;
        champion.table.name.toLowerCase()
        .includes(this.state.filter.toLowerCase()))
      }
  
      if(this.state.handleChange){
        tags = champions.handleChange( champion =&gt;
        champion.table.tags
      .includes(this.state.handleChange()))
      }
  
      return (
        &lt;div&gt;
          &lt;div&gt;
            &lt;input type="text"
                   placeholder="search for a champ"
                   onChange={this.filter.bind(this)}
            /&gt;
          &lt;/div&gt;
  
          &lt;div className="Sort"&gt;
            &lt;select&gt;
              {champions.map((champion, i) =&gt;
                &lt;option key={i}&gt;{champion.table.tags[0]}
                &lt;/option&gt;)}
            &lt;/select&gt;
          &lt;/div&gt;
  
        &lt;ul className="champ-list"&gt;
          {champions.map(champion =&gt; {
            return &lt;li key={champion.table.id} className="col-xs-3"&gt;
              &lt;div&gt;
                &lt;Link to={`/${champion.table.id}`} &gt;
                &lt;img src={`http://ddragon.leagueoflegends.com/cdn/7.5.2/img/champion/${champion.table.image.full}`} /&gt;
                &lt;/Link&gt;
                &lt;/div&gt;
                &lt;Link to={`/${champion.table.id}`} &gt;
              &lt;h3&gt;{champion.table.key}&lt;/h3&gt;
              &lt;h4&gt;{champion.table.title}&lt;/h4&gt;
              &lt;h4&gt;{champion.table.tags}&lt;/h4&gt;
              &lt;/Link&gt;
            &lt;/li&gt;
          })}
        &lt;/ul&gt;
        &lt;/div&gt;
      );
    }
  }
  
  export default Champions;
  </code></pre>
  
  <p>as of right now the dropdown goes through each champion object and populates the  with the first class tag of every champion. I think there are maybe 7 classes total and I can manually create the  if needed, but how can I show All of the champions and then just the ones based on the dropdown selection.</p>
  
  <p>Not sure if this is relevant, but has also given me a bit of a headache in React. The JSON returns an array of 134 objects (champions). Inside each object are several key value pairs as well as more arrays with key value pairs inside of them. The class tags I am trying to sort by are inside of one of these nested arrays. </p>
  
  <p>Any help or even a point in the right direction would be greatly appreciated</p>