reactjsmaterial-uimui-datatable

mui-datatables adding a button next to table title


Is it possible to add a button next to the MUI-datatable title?

Something like:

<MUIDataTable
    ref={ref}
    title={() => (<div><Button>Click Here</Button>Table Title</div>)}
    data={data}
    columns={columns}
    options={options}
/>

With the code above, the title is empty.

What I want to achieve is something similar to this:

enter image description here


Solution

  • Ok I figured it out, it should be:

    <MUIDataTable
        ref={ref}
        title={<div><Button>Click Here</Button>Table Title</div>}
        data={data}
        columns={columns}
        options={options}
    />