title: "TypeError: Cannot read property 'selectPage' of undefined"
body: <p>I am using React, Material-UI and lodash but the following code within the     render method gives me an error saying 
  "TypeError: Cannot read property 'selectPage' of undefined" : </p>
  
  <pre><code>        tmppage = _.map(_.range(0, this.state.groupsdt.length), function (i) {
  
                      return (
                              &lt;MenuItem &gt;
                                  &lt;IconButton onClick={() =&gt; { {this.selectPage(i)} }}&gt;&lt;WebAsset /&gt;&lt;/IconButton&gt;
                                  Page {i + 1}
                              &lt;/MenuItem&gt;
                          )
          });
  </code></pre>
  
  <p>I've defined this.selectPage in constructor(props) as follows : </p>
  
  <pre><code>constructor(props){
      super(props);
      this.state = {
                      loading: true,
                      modalopen: false,
                      menuopen: false,
                      urls:null,
                      groupsdt:null,
                      webkey:null,
  
                      currentpage:0,
  
                      currentBreakpoint: 'lg',
                      mounted: false,
                      layouts: {lg: null},
  
                      opentopublic:false,
  
                    };
  
      this.addPage      = this.addPage.bind(this);
      this.selectPage   = this.selectPage.bind(this);
      this.addBox       = this.addBox.bind(this);
      this.removeBox    = this.removeBox.bind(this);
      this.doPost       = this.doPost.bind(this);
  
      this.doHome       = this.doHome.bind(this);
  }
  </code></pre>
  
  <p>Please tell me what I'm missing... and thank you in advance.</p>