Skip to content

Instantly share code, notes, and snippets.

@jsdaniell
Created July 25, 2019 14:05
Show Gist options
  • Select an option

  • Save jsdaniell/2b3c88f3265336a27232fbb15624b25b to your computer and use it in GitHub Desktop.

Select an option

Save jsdaniell/2b3c88f3265336a27232fbb15624b25b to your computer and use it in GitHub Desktop.
Mui-Datatable without toolbar.
import React, { Fragment } from "react";
import ReactDOM from "react-dom";
import MUIDataTable from "mui-datatables";
class Example extends React.Component {
render() {
const columns = ["Name", "Title", "Location"];
const data = [
["Gabby George", "Business Analyst", "Minneapolis"],
["Aiden Lloyd", "Business Consultant", "Dallas"],
["Jaden Collins", "Attorney", "Santa Ana"],
["Franky Rees", "Business Analyst", "St. Petersburg"],
["Aaren Rose", null, "Toledo"]
];
const options = {
filter: false,
search: false,
print: false,
download: false,
viewColumns: false,
customToolbar: null,
responsive: "stacked"
};
return (
<MUIDataTable
title={""}
data={data}
columns={columns}
options={options}
/>
);
}
}
const rootElement = document.getElementById("root");
ReactDOM.render(<Example />, rootElement);
@jsdaniell

Copy link
Copy Markdown
Author

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment