0

How to add another action in the Material table and add this in the react material table with the element. and get row data onChange event. I am currently rendering on the state.

Please check this code and suggest me how to use this.

1 Answers1

0

you can add actions attribute in material-table:

 actions={[
      {
        icon: 'save',
        tooltip: 'Save User',
        onClick: (event, rowData) => alert("You saved " + rowData.name)
      },
      {
        icon: 'delete',
        tooltip: 'Delete User',
        onClick: (event, rowData) => confirm("You want to delete " + rowData.name)
      }
    ]}
sidverma
  • 1,159
  • 12
  • 24