Created
July 25, 2019 14:05
-
-
Save jsdaniell/2b3c88f3265336a27232fbb15624b25b to your computer and use it in GitHub Desktop.
Mui-Datatable without toolbar.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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
commented
Jul 25, 2019
Author

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