Material-table: Overriding MTableHeader (how to add button to header)

Created on 6 Aug 2019  路  1Comment  路  Source: mbrn/material-table

How would I go about overriding MTableHeader to add a button directly to the right of the search bar in the table header. Thank you!

Most helpful comment

You can add a button with the 'actions' prop and set 'isFreeAction' to true.
Exemple:

actions={[
            {
              icon: () => <FilterlistIcon />,
              tooltip: 'Filter',
              onClick: (event, rowData) =>  alert("Alert"),
              isFreeAction: true
            },
          ]}

image

>All comments

You can add a button with the 'actions' prop and set 'isFreeAction' to true.
Exemple:

actions={[
            {
              icon: () => <FilterlistIcon />,
              tooltip: 'Filter',
              onClick: (event, rowData) =>  alert("Alert"),
              isFreeAction: true
            },
          ]}

image

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bohrsty picture bohrsty  路  3Comments

slevy85 picture slevy85  路  3Comments

terapepo picture terapepo  路  3Comments

ModPhoenix picture ModPhoenix  路  3Comments

jlgreene2 picture jlgreene2  路  3Comments