Search code examples
reactjsmaterial-uimaterial-table

How to set action column as last column in material ui table ReactJs?


Material Table

I want to set the action column as the last column .Here is my code:

<MaterialTable
  title="Patient List"
  columns={state.columns}
  data={data}
  onRowClick={(event, rowData) => handleCLickRow(event, rowData)}
  editable={{}),
 />

Solution

  • I believe you are looking for the actionsColumnIndex that can be passed with options object.

    The full list of props can be found here: https://material-table.com/#/docs/all-props