Material-table: Clickable Row

Created on 7 May 2019  路  1Comment  路  Source: mbrn/material-table

I am trying to override component Row so it can be clickable and pass some action to it.
I have action buttons which do call, however I want to do the same call on row click. Can you give me advise how to solve it?

components={{
    Row: props => (
        <MTableBodyRow onClick={this.someFunc} {...props} />
    )
}}
help wanted

Most helpful comment

Hi @kuantayevs ,

Look at 3rd example at https://material-table.com/#/docs/features/detail-panel. MT already has a onRowClick prop.

>All comments

Hi @kuantayevs ,

Look at 3rd example at https://material-table.com/#/docs/features/detail-panel. MT already has a onRowClick prop.

Was this page helpful?
0 / 5 - 0 ratings