title: How to get row number of "parent" table in React-table from another react table in sub component?
body: <p>I am using <a href="https://www.npmjs.com/package/react-table" rel="nofollow noreferrer">react-table</a> with "parent" table that has sub component with another react table.</p>
  
  <p>I need to use the row number of the parent in cell editing of the inner table.</p>
  
  <p>I am trying to generate a new prop that will deliver the row.index value of the parent, as in <code>parentRow = {row.index}</code> below.
  But I fail to pass the row.index value.</p>
  
  <p><strong>In short: How to pass row.index of parent to react table in sub component?</strong></p>
  
  <p>Any help is appreciated.</p>
  
  <pre><code>      &lt;ReactTable
            data={this.props.data}
            columns = {this.WP2columns}
            pageSize={this.props.data.length+1}
            showPagination={false}
            className="-striped -highlight"
            SubComponent={row =&gt; {
              return (
                &lt;div style={{ padding: "0 20px" }}&gt;
                  {console.log("WP2 SUBTABLE row=", row) }
                  &lt;ReactTable
                    data = {row.original.familywp_goal_tasklist}
                    columns={this.subcolumns}
                    parentRow = {row.index}
                    defaultPageSize={3}
                    showPagination={false}
                  /&gt;
                &lt;/div&gt;
              )
            }}
          /&gt;
  </code></pre>