0
<MaterialTable 
onRowClick={() => openRightDrawer()}
actions={[
{
icon:"Check",
tooltip:"Activate",
onClick: () => activateAccount()
}
]}
components={{
Action: props => <Button onClick={() => props.action.onClick()}>Activate</Button>
}}
/>

when I click a button, onRowClick event also triggering is there any workaround for this?

Srikanth Gowda
  • 6,163
  • 7
  • 19
  • 34

1 Answers1

2

thanks @mbrn, got it working https://github.com/mbrn/material-table/issues/1362

<MaterialTable 
onRowClick={() => openRightDrawer()}
actions={[
{
icon:"Check",
tooltip:"Activate",
onClick: () => activateAccount()
}
]}
components={{
Action: props => <Button onClick={(event) => {
    props.action.onClick();
    event.stopPropagation();
 }
}>Activate</Button>
}}
/>
Srikanth Gowda
  • 6,163
  • 7
  • 19
  • 34