I have a table with football player data such as wins, losses etc. I also have a drop down box of player names. I want to be able to select a player name from the drop down box and filter the table to only show the data from that table. I have tried using the curr

```
class F
      this.state = { footballStats: [], selectedPlayers: []}
    }

     componentDidMount() {    
       fetch('http://localhost:3000/footballstats')
           .then((data) => data.json())
           .then((data) => this.setState( { footballStats: data, selectedPlayers: data } ));
           //.then((data) => this.setState( { footballStats: _.sortBy(this.state.footballStats, 'L') } ));

    }

  getSelectedPlayers(player) {
    if (!player) {
      this.setState({selectedPlayers: this.state.footballStats});
    }ayer;   
        })]})
    }
  }
    render() {
        let names = this.state.footballStats;
        let optionItems = names.map((item) =>
        <option key={item.NAME}>{item.NAME}</option>
        );

              <select onChange={(e) => this.getSelectedPlayers(e)}> {optionItems}
              </select>
              <br></br>
              <br></br>

          <table border={1}>
            <tbody>
              <tr><th></th><th>Code</th><th>Player</th><th>W</th><th>L</th> </tr>
              {this.state.selectedPlayers.map((item) => {
                return (<tr key={item.TEAMCODE}</td><td>{item.NAME}</td><td>{item.W}</td><td>{item.L}</td><td></tr>);
              })}
            </tbody>
      );
    }
}

  ReactDOM.render(<FootballStats/>, document.getElementById('root'));

{
    "footballStats": [
        {
            "ID": 1,
            "NAME": "Phil Jones",
            "TEAMCODE": "MNU",
            "W":  "17
        },
        {

```