score:5

at the time of this writing, react-table 6.8.0:

the value of 'column' in 'gettrprops' property is always undefined.

you'll have to use 'gettdprops' property instead.

score:20

you add gettrprops to reacttable like the example:

const onrowclick = (state, rowinfo, column, instance) => {
    return {
        onclick: e => {
            console.log('a td element was clicked!')
            console.log('it produced this event:', e)
            console.log('it was in this column:', column)
            console.log('it was in this row:', rowinfo)
            console.log('it was in this table instance:', instance)
        }
    }
}


<reacttable data={[]} columns={[]} gettrprops={onrowclick} />

Related Query

More Query from same tag