Skip to content

Is there an onRowClick event or equivalent? #47

Answered by KevinVandy
lachlancollins asked this question in Q&A
Discussion options

You must be logged in to vote

Yes! Read the Table Event Listener Docs and you will find exactly what you are looking for.

But here is basically what you want

<MaterialReactTable
  muiTableBodyRowProps={({ row }) => ({
    onClick: (event) => {
      console.info(event, row.id);
    },
  })}
/>

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@lachlancollins
Comment options

Answer selected by lachlancollins
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants