2

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

1 Answer 1

5

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}
/>
Sign up to request clarification or add additional context in comments.

Comments

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.