I am using https://github.com/gregnb/mui-datatables
How can I download the table title as well?
This is the table title, logo, data, and then the date:
codesandbox: https://codesandbox.io/s/download-the-title-as-well-q3ysil?file=/index.js
codes:
function App() {
const columns = ["Name", "Title", "Location"];
const options = {
filter: true,
filterType: "dropdown",
responsive,
tableBodyHeight,
tableBodyMaxHeight
};
const data = [
["Gabby George", "Business Analyst", "Minneapolis"],
[
"Aiden Lloyd",
"Business Consultant for an International Company and CEO of Tony's Burger Palace",
"Dallas"
],
["Jaden Collins", "Attorney", "Santa Ana"],
["Franky Rees", "Business Analyst", "St. Petersburg"],
["Aaren Rose", null, "Toledo"],
["Johnny Jones", "Business Analyst", "St. Petersburg"],
["Jimmy Johns", "Business Analyst", "Baltimore"],
["Jack Jackson", "Business Analyst", "El Paso"],
["Joe Jones", "Computer Programmer", "El Paso"],
["Jacky Jackson", "Business Consultant", "Baltimore"],
["Jo Jo", "Software Developer", "Washington DC"],
["Donna Marie", "Business Manager", "Annapolis"]
];
return (
<React.Fragment>
<MUIDataTable
title={
<div>
<img
src="https://cdn.logo.com/hotlink-ok/logo-social.png"
style={{ width: "50px" }}
/>
Data {new Date().toDateString()}
</div>
}
data={data}
columns={columns}
options={options}
/>
</React.Fragment>
);
}
ReactDOM.render(<App />, document.getElementById("root"));