title: Adding serial number column in the table
body: <p>I am using a library named react-data-table-component for table in my application. Everything is going pretty smooth however I need to add a column which will show serial number in my table. The serial number will always start from 1 to total number of objects in photos array.</p>
  
  <pre><code>const columns = [
      {
        name: '#',
        selector: 'id',
        cell: (row) =&gt; &lt;span&gt;{I need to show serial number here}&lt;/span&gt;
      },
      {
        name: 'Name',
        selector: 'photo_link',
        sortable: true,
      }
      ... // Other fields
  ]
  
  &lt;DataTable
          columns={columns}
          data={photos}
          paginationTotalRows={total_photos}
  
  </code></pre>
  
  <p>Cell key inside column array just takes row as argument and it has current object but I can't get the index of object.</p>
  
  <p>I have the id field in every object of the array but that is not in sequence which I need. How do I solve this problem?</p>