glittershark / reactable

Fast, flexible, and simple data tables in React
glittershark.github.io/reactable
MIT License
1.51k stars 222 forks source link

WIP: add onRowClick prop to Tabel component #361

Closed tvilon closed 7 years ago

tvilon commented 7 years ago

onRowClick prop accepts a function. The function will be called on each row clicked and the row data will be passed along as first argument.

<Table 
  data={[
    {id: 1, name: 'Rich'},
    {id: 2, name: 'Phil'}
  ]}
  onRowClick={(data, event) => customFunction(data)}
/>