0

This is a question specific to MaterialTable. I have gone through the docs and the API but can not find an efficient way to customize the Actions column and add an icon for view details.

I am working with a relational database and would like to be able to link it for each user on their row.

Add Button after trash can

1 Answer 1

2

The Material Table documentation states that you can pass an array of actions to the actions prop on the MaterialTable component.

Each action element in the array can have fields specified, which include icon and onClick. icon can be a custom component.

Here's the example from the documentation linked above:

<MaterialTable
  // other props
  actions={[
    {
      icon: 'save',
      tooltip: 'Save User',
      onClick: (event, rowData) => {
        // Do save operation
      }
    }
  ]}
/>
Sign up to request clarification or add additional context in comments.

1 Comment

Sir there are no words I could conjure up which would adequately articulate my gratitude. So I will just say: Perfect!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.