React-table: Only able to access data inside cell through row._original

Created on 13 Sep 2017  路  3Comments  路  Source: tannerlinsley/react-table

What version of React-Table are you using?

6.5.3

What bug are you experiencing, or what feature are you proposing?

The only way I am able to access the data I need inside a table cell is row._original
This works, I am just concerned there may be something I am doing wrong or could have a potential future problem.

      { 
        Header: 'Name',
        id: 'name',
        accessor: s => s.name,
        Cell: props => <a onClick={() => {
          this.onStudyClicked(props.row._original)
        }
        }>{props.value}</a>,
      },

Most helpful comment

Use props.original

All 3 comments

Use props.original

Damn I thought that was one of the first things I had tried! Don't think I waited long enough for the compile. Thank you!

const data = React.useMemo(() => _data, []);

Was this page helpful?
0 / 5 - 0 ratings

Related issues

monarajhans picture monarajhans  路  3Comments

williamolojede picture williamolojede  路  3Comments

panfiva picture panfiva  路  3Comments

ocalde picture ocalde  路  3Comments

pasichnyk picture pasichnyk  路  3Comments