How can I put two color backgrounds on two different lines?
I managed to set it up on a row before click on a table row and I would like to put a second backgroundcolor on another row when a condition is met
import React from "react";
import { makeStyles } from "#material-ui/core/styles";
import {TableBody, Table, TableCell, TableContainer, TableHead, TableRow, Paper} from "#material-ui/core";
import { useState } from "react";
const useStyles = makeStyles({
table: {
minWidth: 650
},
tableRow: {
"&$selected, &$selected:hover": {
backgroundColor: "#E8E8E8"
}
},
hover: {},
selected: {}
});
function createData(name, calories, fat, carbs, protein) { return { name, calories, fat, carbs, protein }; }
const rows = [ createData("Frozen yoghurt", 159, 6.0, 24, 4.0), createData("Ice cream sandwich", 237, 9.0, 37, 4.3), createData("Eclair", 262, 16.0, 24, 6.0), createData("Cupcake", 305, 3.7, 67, 4.3), createData("Gingerbread", 356, 16.0, 49, 3.9) ];
export default function SimpleTable() {
const classes = useStyles();
const [selectedIndex, setSelectedIndex] = useState(null);
const val = false;
const secondRow = 0;
const selectRow = (i) => {
setSelectedIndex(i);
if (val) {
// put a backgroundcolor on line 1
}
};
return (
<TableContainer component={Paper}>
<Table className={classes.table} aria-label="simple table">
<TableHead>
<TableRow>
<TableCell>Dessert (100g serving)</TableCell>
<TableCell align="right">Calories</TableCell>
<TableCell align="right">Fat (g)</TableCell>
<TableCell align="right">Carbs (g)</TableCell>
<TableCell align="right">Protein (g)</TableCell>
</TableRow>
</TableHead>
<TableBody>
{rows.map((row, index) => (
<TableRow hover key={row.name} onClick={() => {selectRow(index);}} selected=selectedIndex === index} classes={{ hover: classes.hover, selected: classes.selected }} className={classes.tableRow} >
<TableCell component="th" scope="row">
{row.name}
</TableCell>
<TableCell align="right">{row.calories}</TableCell>
<TableCell align="right">{row.fat}</TableCell>
<TableCell align="right">{row.carbs}</TableCell>
<TableCell align="right">{row.protein}</TableCell>
</TableRow>
))}
</TableBody>
</Table>
</TableContainer>
);
}
https://codesandbox.io/s/material-demo-forked-5u4jz?file=/demo.js
You can assign an array as your state for it to contain the selected indices. In the example below, I used shift on the array to retain the latest selection, remove the oldest one, and push the new one.
const [selectedIndex, setSelectedIndex] = useState([]);
const selectRow = (i) => {
// checks to see if it's already selected
if (selectedIndex.includes(i)) {
return;
}
let newSelected = [...selectedIndex];
// sample logic for the "only 2 rows selected" requirement
if (newSelected.length === 2) {
newSelected.shift();
newSelected.push(i);
} else {
newSelected.push(i);
}
setSelectedIndex(newSelected);
};
<TableRow
onClick={() => {
selectRow(index);
}}
selected={selectedIndex.includes(index)}
>
https://codesandbox.io/s/material-demo-forked-h5i77?file=/demo.js
Related
I'm creating a table where the data will be fetched from api and displayed in the mui table or material table. I wanna show different action button to different rows like in the first row the button should display "connect" when I click on that connect it should be changed into "disconnect" the problem here is it changes all the existing "connect" button into disconnect and again when the disconnect is clicked the button should change into connect. I want this behaviour to apply for that particular row alone not the entire table. How can I achieve this?
You should extent the array of data that you use on the Mui table by adding an extra fields for each row. One for saving the status ("connect" or "disconnect") and other for recognizing the row that must change.
After that you will be able to call the onClick event of the Button component and will affect only the target row.
Taking the example from Mui page on codesandbox, I added the "id" and "isConnected" prop to the data array. You can see the modified version in this link and also bellow:
function createData(id, name, calories, fat, carbs, protein, isConnected) {
return { id, name, calories, fat, carbs, protein, isConnected };
}
const data = [
createData(1, "Frozen yoghurt", 159, 6.0, 24, 4.0, true),
createData(2, "Ice cream sandwich", 237, 9.0, 37, 4.3, false),
createData(3, "Eclair", 262, 16.0, 24, 6.0, false),
createData(4, "Cupcake", 305, 3.7, 67, 4.3, false),
createData(5, "Gingerbread", 356, 16.0, 49, 3.9, false)
];
export default function BasicTable() {
const [rows, setRows] = React.useState(data);
const handleChangeConnect = (id) => {
console.log("The id is ", id);
setRows(
rows.map((row) => {
if (row.id == id) {
return { ...row, isConnected: !row.isConnected };
} else return { ...row };
})
);
};
return (
<TableContainer component={Paper}>
<Table sx={{ minWidth: 650 }} aria-label="simple table">
<TableHead>
<TableRow>
<TableCell>Dessert (100g serving)</TableCell>
<TableCell align="right">Calories</TableCell>
<TableCell align="right">Fat (g)</TableCell>
<TableCell align="right">Carbs (g)</TableCell>
<TableCell align="right">Protein (g)</TableCell>
<TableCell align="right">Is connected</TableCell>
</TableRow>
</TableHead>
<TableBody>
{rows.map((row) => (
<TableRow
key={row.name}
sx={{ "&:last-child td, &:last-child th": { border: 0 } }}
>
<TableCell component="th" scope="row">
{row.name}
</TableCell>
<TableCell align="right">{row.calories}</TableCell>
<TableCell align="right">{row.fat}</TableCell>
<TableCell align="right">{row.carbs}</TableCell>
<TableCell align="right">{row.protein}</TableCell>
<TableCell align="right">
<Button
variant="contained"
color={row.isConnected ? "primary" : "secondary"}
onClick={() => {
handleChangeConnect(row.id);
}}
>
{row.isConnected ? "disconnect" : "connect"}
</Button>
</TableCell>
</TableRow>
))}
</TableBody>
</Table>
</TableContainer>
);
}
```l
Instead of using var for determining if it is connect or disconnect you need to use associative array for determine that example
if(check[index]==true){
<button onClick={handlechange}>Disconnect </button>
}
else {
<button onClick={handlechange}>connect </button>}
just started learning react. I dont know many basic things so here we go.
I am trying to implement an example of a table found on react material-ui.
Got the following code:
import { makeStyles } from '#material-ui/core/styles';
import Table from '#material-ui/core/Table';
import TableBody from '#material-ui/core/TableBody';
import TableCell from '#material-ui/core/TableCell';
import TableContainer from '#material-ui/core/TableContainer';
import TableHead from '#material-ui/core/TableHead';
import TableRow from '#material-ui/core/TableRow';
import Paper from '#material-ui/core/Paper';
const useStyles = makeStyles({
table: {
minWidth: 650,
},
});
function createData(name, calories, fat, carbs, protein) {
return { name, calories, fat, carbs, protein };
}
const rows = [
createData('Frozen yoghurt', 159, 6.0, 24, 4.0),
createData('Ice cream sandwich', 237, 9.0, 37, 4.3),
createData('Eclair', 262, 16.0, 24, 6.0),
createData('Cupcake', 305, 3.7, 67, 4.3),
createData('Gingerbread', 356, 16.0, 49, 3.9),
];
export default function BasicTable() {
const classes = useStyles();
return (
<TableContainer component={Paper}>
<Table className={classes.table} aria-label="simple table">
<TableHead>
<TableRow>
<TableCell>Dessert (100g serving)</TableCell>
<TableCell align="right">Calories</TableCell>
<TableCell align="right">Fat (g)</TableCell>
<TableCell align="right">Carbs (g)</TableCell>
<TableCell align="right">Protein (g)</TableCell>
</TableRow>
</TableHead>
<TableBody>
{rows.map((row) => (
<TableRow key={row.name}>
<TableCell component="th" scope="row">
{row.name}
</TableCell>
<TableCell align="right">{row.calories}</TableCell>
<TableCell align="right">{row.fat}</TableCell>
<TableCell align="right">{row.carbs}</TableCell>
<TableCell align="right">{row.protein}</TableCell>
</TableRow>
))}
</TableBody>
</Table>
</TableContainer>
);
}
and then i got the following error :
Can someone please tell me why is that?
UPDATE:I had to update both react and react-dom to latest version
I copied your code, added import React from 'react' , and all it worked
I have a table created with ReactJs & Material Ui like the code below.
Her a live test: https://codesandbox.io/s/material-demo-692nz?file=/demo.js
I want to reduce the space between columns, there is always big space after first column no matter how many columns i add after it. It's like they have some 'space-between' style but cannot remove it.
Any tips ? thank you
import React from "react";
import { makeStyles } from "#material-ui/core/styles";
import Table from "#material-ui/core/Table";
import TableBody from "#material-ui/core/TableBody";
import TableCell from "#material-ui/core/TableCell";
import TableContainer from "#material-ui/core/TableContainer";
import TableHead from "#material-ui/core/TableHead";
import TableRow from "#material-ui/core/TableRow";
import Paper from "#material-ui/core/Paper";
const useStyles = makeStyles({
table: {
minWidth: 50
}
});
function createData(name, calories, fat, carbs, protein) {
return { name, calories, fat, carbs, protein };
}
const rows = [
createData("Frozen yoghurt", 159, 6.0, 24, 4.0),
createData("Ice cream sandwich", 237, 9.0, 37, 4.3),
createData("Eclair", 262, 16.0, 24, 6.0),
createData("Cupcake", 305, 3.7, 67, 4.3),
createData("Gingerbread", 356, 16.0, 49, 3.9)
];
export default function SimpleTable() {
const classes = useStyles();
return (
<TableContainer component={Paper}>
<Table className={classes.table} aria-label="simple table">
<TableHead>
<TableRow>
<TableCell align="left">Dessert (100g serving)</TableCell>
<TableCell align="left">Calories</TableCell>
</TableRow>
</TableHead>
<TableBody>
{rows.map(row => (
<TableRow key={row.name}>
<TableCell component="th" scope="row">
{row.name}
</TableCell>
<TableCell align="left">{row.calories}</TableCell>
</TableRow>
))}
</TableBody>
</Table>
</TableContainer>
);
}
Using inline-style, add width to <TableCell /> under <TableHead /> would be fine
<TableCell align="left" style={{width: 200}}>Dessert (100g serving)</TableCell>
Update:
There are multiple ways to define the width style
style={{width: '20vw'}}
or
style={{minWidth: 200}}
may work for the style requests.
I am trying to implement a simple onCellClick listener on Material UI table.
In earlier versions of it, a function in the table scope onCellClick used to give the row and column number where click was made as shown here
Currently when this function is placed -
import React from 'react';
import PropTypes from 'prop-types';
import { withStyles } from '#material-ui/core/styles';
import Table from '#material-ui/core/Table';
import TableBody from '#material-ui/core/TableBody';
import TableCell from '#material-ui/core/TableCell';
import TableHead from '#material-ui/core/TableHead';
import TableRow from '#material-ui/core/TableRow';
import Paper from '#material-ui/core/Paper';
const styles = {
}
let id = 0;
function createData(name, calories, fat, carbs, protein) {
id += 1;
return { id, name, calories, fat, carbs, protein };
}
const rows = [
createData('Frozen yoghurt', 159, 6.0, 24, 4.0),
createData('Ice cream sandwich', 237, 9.0, 37, 4.3),
createData('Eclair', 262, 16.0, 24, 6.0),
createData('Cupcake', 305, 3.7, 67, 4.3),
createData('Gingerbread', 356, 16.0, 49, 3.9),
];
function SimpleTable(props) {
const { classes } = props;
return (
<Paper className={classes.root}>
<Table className={classes.table}
onCellClick={(rowNumber,
columnId) =>
console.log(rowNumber,columnId)}>
<TableHead>
<TableRow>
<TableCell>Dessert (100g serving)</TableCell>
<TableCell numeric>Calories</TableCell>
<TableCell numeric>Fat (g)</TableCell>
<TableCell numeric>Carbs (g)</TableCell>
<TableCell numeric>Protein (g)</TableCell>
</TableRow>
</TableHead>
<TableBody>
{rows.map(row => {
return (
<TableRow key={row.id}>
<TableCell component="th" scope="row">
{row.name}
</TableCell>
<TableCell numeric>{row.calories}</TableCell>
<TableCell numeric>{row.fat}</TableCell>
<TableCell numeric>{row.carbs}</TableCell>
<TableCell numeric>{row.protein}</TableCell>
</TableRow>
);
})}
</TableBody>
</Table>
</Paper>
);
}
export default withStyles(styles)(SimpleTable);
it throws the error Unknown event handler property onCellClick. It will be ignored.This is expected because unlike previous versions no onCellClick function is passed in the table source code.
How to achieve onCellClick functionality now in Material-UI?
Any help will be highly appreciated.
A cell can be a th or td element (see the source code) or a custom element that you pass through the component property.
Each of these will have support for the onClick property.
So you need something like this:
handleClick = (id, column) => {
return (event) => {
console.log(`You clicked on row with id ${id}, in column ${column}.`);
}
}
render() {
return (
// ...
{this.state.rows.map((row) => (
<TableRow key={row.id}>
<TableCell onClick={this.handleClick(row.id, "calories")}>
{row.calories}
</TableCell>
// ...
<TableCell onClick={this.handleClick(row.id, "protein")}>
{row.protein}
</TableCell>
</TableRow>
)}
// ...
);
}
I am using the Table control from material UI to display the data , but right now I have the requirement to show the group data,with expand and collapsed data.Is there any package present to achieve this goal?Please assist me.
import { TableRowProps, Table, TableBody, TableFooter, PagiFooter, TableHeader, TableHeaderColumn, TableRow, TableRowColumn } from 'material-ui/Table';
<Table>
<TableHeader {...headerProps}>
{this.renderHeaders()}
</TableHeader>
<TableBody displayRowCheckbox={false}
deselectOnClickaway={false}>
{this.renderRows()}
</TableBody>
</Table>
The Table component doesn't currently support expansion, but you can hack around that using the expandable card component, just make sure you adjust the vertical alignment of the row.
Here's a code snippet:
<TableBody displayRowCheckbox={false}>
{this.props.user.leads.map((lead, i) => (
<TableRow key={i}>
<TableRowColumn>
<Card style={{boxShadow: 'none'}}>
<CardHeader
title={lead.brand}
style={{paddingLeft: 0, fontWeight: 600}}
actAsExpander={true}
/>
<CardText expandable={true}>
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Donec mattis pretium massa. Aliquam erat volutpat. Nulla facilisi.
Donec vulputate interdum sollicitudin. Nunc lacinia auctor quam sed pellentesque.
Aliquam dui mauris, mattis quis lacus id, pellentesque lobortis odio.
</CardText>
</Card>
</TableRowColumn>
<TableRowColumn style={{verticalAlign: 'top', height: 'auto', paddingTop: '1.4em'}}>{lead.budget}</TableRowColumn>
<TableRowColumn style={{verticalAlign: 'top', height: 'auto', paddingTop: '1.4em'}}>{lead.eventName ? 'Event' : 'Content'}</TableRowColumn>
<TableRowColumn style={{verticalAlign: 'top', height: 'auto', paddingTop: '1.4em'}}>{lead.firstName + ' ' + lead.lastName}</TableRowColumn>
<TableRowColumn style={{verticalAlign: 'top', height: 'auto', paddingTop: '1.4em'}}>Archive | Start Campaign</TableRowColumn>
</TableRow>
))}
</TableBody>
An approach for Material Ui , but can be used with same structure in other table formats:
import React from 'react';
import PropTypes from 'prop-types';
import { withStyles } from '#material-ui/core/styles';
import Table from '#material-ui/core/Table';
import TableBody from '#material-ui/core/TableBody';
import TableCell from '#material-ui/core/TableCell';
import TableHead from '#material-ui/core/TableHead';
import TableRow from '#material-ui/core/TableRow';
import Paper from '#material-ui/core/Paper';
import Collapse from '#material-ui/core/Collapse';
import CardActions from '#material-ui/core/CardActions';
import IconButton from '#material-ui/core/IconButton';
import ExpandMoreIcon from '#material-ui/icons/ExpandMore';
const styles = theme => ({
root: {
width: '100%',
marginTop: theme.spacing.unit * 3,
overflowX: 'auto',
},
table: {
minWidth: 700,
},
expand: {
transform: 'rotate(0deg)',
transition: theme.transitions.create('transform', {
duration: theme.transitions.duration.shortest,
}),
marginLeft: 'auto',
[theme.breakpoints.up('sm')]: {
marginRight: -8,
},
},
expandOpen: {
transform: 'rotate(180deg)',
},
});
let id = 0;
function createData(name, calories, fat, carbs, protein) {
id += 1;
return { id, name, calories, fat, carbs, protein };
}
const rows = [
createData('Frozen yoghurt', 159, 6.0, 24, 4.0),
createData('Frozen yoghurt', 159, 6.0, 24, 4.0),
createData('Ice cream sandwich', 237, 9.0, 37, 4.3),
createData('Ice cream sandwich', 237, 9.0, 37, 4.3),
createData('Eclair', 262, 16.0, 24, 6.0),
createData('Eclair', 262, 16.0, 24, 6.0),
createData('Cupcake', 305, 3.7, 67, 4.3),
createData('Cupcake', 305, 3.7, 67, 4.3),
createData('Gingerbread', 356, 16.0, 49, 3.9),
createData('Gingerbread', 356, 16.0, 49, 3.9)
];
class TableGroup extends React.Component {
constructor(props) {
super(props);
this.state = { expanded: {} };
}
handleExpandClick(key) {
let state = { ...this.state };
state.expanded[key] = !!!state.expanded[key];
this.setState(state);
}
render() {
const props = this.props;
const { groupProperty, rows, ...other } = props;
const groups = rows.reduce((acc, row) => {
acc[row[groupProperty]] = acc[row[groupProperty]] || [];
acc[row[groupProperty]].push(row);
return acc;
}, {});
const keys = Object.keys(groups);
return keys.map(key => (
<TableRow>
<TableCell colspan="5">
<CardActions disableActionSpacing>
<b>{key} ({groups[key].length})</b>
<IconButton
className={this.state.expanded[key] ? props.classes.expandOpen : props.classes.expand}
onClick={this.handleExpandClick.bind(this, key)}
aria-expanded={this.state.expanded[key]}
aria-label="Show more"
>
<ExpandMoreIcon />
</IconButton>
</CardActions>
<Collapse in={this.state.expanded[key]} timeout="auto" unmountOnExit>
<Table {...other}>
<TableBody>
{groups[key].map(row => (
<TableRow key={row.id}>
<TableCell component="th" scope="row">
{row.name}
</TableCell>
<TableCell numeric>{row.calories}</TableCell>
<TableCell numeric>{row.fat}</TableCell>
<TableCell numeric>{row.carbs}</TableCell>
<TableCell numeric>{row.protein}</TableCell>
</TableRow>
)
)}
</TableBody>
</Table>
</Collapse>
</TableCell>
</TableRow>
)
)
}
};
function SimpleTable(props) {
const { classes } = props;
return (
<Paper className={classes.root}>
<Table >
<TableHead>
<TableRow>
<TableCell>Dessert (100g serving)</TableCell>
<TableCell numeric>Calories</TableCell>
<TableCell numeric>Fat (g)</TableCell>
<TableCell numeric>Carbs (g)</TableCell>
<TableCell numeric>Protein (g)</TableCell>
</TableRow>
</TableHead>
<TableBody>
<TableGroup classes={classes} rows={rows} groupProperty="name" />
</TableBody>
</Table>
</Paper>
);
}
SimpleTable.propTypes = {
classes: PropTypes.object.isRequired,
};
export default withStyles(styles)(SimpleTable);
function createData(name, calories, fat, carbs, protein) {
return { name, calories, fat, carbs, protein };
}
const rows = [
createData('Frozen yoghurt', 159, 6.0, 24, 4.0),
createData('Ice cream sandwich', 237, 9.0, 37, 4.3),
createData('Eclair', 262, 16.0, 24, 6.0),
createData('Cupcake', 305, 3.7, 67, 4.3),
createData('Gingerbread', 356, 16.0, 49, 3.9),
];
const DataCard = ({ show }) => {
const classes = useStyles();
const [open, setOpen] = useState();
const handleExpandedClick = index => (e) => {
setOpen(index === open ? '' : index);
}
return (
<Only when={show}>
<Paper className={classes.root}>
<Table className={classes.table}>
<TableHead>
<TableRow>
<TableCell>Dessert (100g serving)</TableCell>
<TableCell align="right">Calories</TableCell>
<TableCell align="right">Fat (g)</TableCell>
<TableCell align="right">Carbs (g)</TableCell>
<TableCell align="right">Protein (g)</TableCell>
</TableRow>
</TableHead>
<TableBody>
{rows.map((row, index) => (
<>
<TableRow
key={index}
hover
style={{ cursor: 'pointer' }}
onClick={handleExpandedClick(index)}
>
<TableCell component="th" scope="row">{row.name}</TableCell>
<TableCell align="right">{row.calories}</TableCell>
<TableCell align="right">{row.fat}</TableCell>
<TableCell align="right">{row.carbs}</TableCell>
<TableCell align="right">{row.protein}</TableCell>
</TableRow>
<Collapse in={open === index} hidden={open !== index} component="tr" style={{ display: "block" }}>
<td>
<div>Expanded data.</div>
</td>
</Collapse>
</>
))}
</TableBody>
</Table>
</Paper>
</Only>
)
}
DataCard.propTypes = {
show: PropTypes.bool.isRequired
}
export default DataCard;
Thank you #bluehipy, I have managed rewrite the code with hooks
import React, { useEffect, useState } from "react";
import PropTypes from "prop-types";
import { withStyles } from "#material-ui/core/styles";
import Table from "#material-ui/core/Table";
import TableBody from "#material-ui/core/TableBody";
import TableCell from "#material-ui/core/TableCell";
import TableHead from "#material-ui/core/TableHead";
import TableRow from "#material-ui/core/TableRow";
import Paper from "#material-ui/core/Paper";
import Collapse from "#material-ui/core/Collapse";
import CardActions from "#material-ui/core/CardActions";
import IconButton from "#material-ui/core/IconButton";
import ExpandMoreIcon from "#material-ui/icons/ExpandMore";
import getOrdersBasedOnRouteQuery from "../graphql/queries/getOrdersBasedOnRouteQuery";
const styles = theme => ({
root: {
width: "100%",
marginTop: theme.spacing.unit * 3,
overflowX: "auto"
},
table: {
minWidth: 700
},
expand: {
transform: "rotate(0deg)",
transition: theme.transitions.create("transform", {
duration: theme.transitions.duration.shortest
}),
marginLeft: "auto",
[theme.breakpoints.up("sm")]: {
marginRight: -8
}
},
expandOpen: {
transform: "rotate(180deg)"
}
});
const grouped = values => {
let finalArray = [];
values.customers.filter(orders => {
return Array.prototype.push.apply(finalArray, orders);
});
return finalArray;
};
const TableGroup = ({ classes, routes, ...other }) => {
const [expanded, setExpanded] = useState({});
const handleExpandClick = value => {
setExpanded(expanded => {
return {
...expanded,
[value]: expanded[value] ? false : true
};
});
};
return routes.map((route, routeIndex) => {
return (
<TableRow>
<TableCell colspan="5">
<CardActions disableActionSpacing>
<b>
{route.name} - ({grouped(route).length}){" "}
</b>
<IconButton
className={
expanded[route.name] ? classes.expandOpen : classes.expand
}
onClick={() => handleExpandClick(route.name)}
aria-expanded={route.name}
aria-label="Show more"
>
<ExpandMoreIcon />
</IconButton>
</CardActions>
<Collapse in={expanded[route.name]} timeout="auto" unmountOnExit>
<Table {...other}>
<TableBody>
{grouped(route).map(row => {
return (
<TableRow key={row.id}>
<TableCell text>{row.reference}</TableCell>
<TableCell text>{row.customer.full_name}</TableCell>
<TableCell numeric>{row.total}</TableCell>
<TableCell>{row.status}</TableCell>
<TableCell>{row.created_at}</TableCell>
</TableRow>
);
})}
</TableBody>
</Table>
</Collapse>
</TableCell>
</TableRow>
);
});
};
const SimpleTable = ({ classes }) => {
const [routes, setRoutes] = useState([]);
const [loading, setLoading] = useState(true);
const fetchAllOrders = async () => {
const result = await getOrdersBasedOnRouteQuery();
if (!result.loading) {
setRoutes(result.data.route);
setLoading(false);
}
};
useEffect(() => {
fetchAllOrders();
}, [loading === true]);
if (loading) {
return <div>Loading...</div>;
}
return (
<Paper className={classes.root}>
<Table>
<TableHead>
<TableRow>
<TableCell>Reference</TableCell>
<TableCell numeric>Customer Name</TableCell>
<TableCell numeric>Total</TableCell>
<TableCell numeric>Status</TableCell>
<TableCell numeric>Created At</TableCell>
</TableRow>
</TableHead>
<TableBody>
<TableGroup classes={classes} routes={routes} groupProperty="name" />
</TableBody>
</Table>
</Paper>
);
};
SimpleTable.propTypes = {
classes: PropTypes.object.isRequired
};
export default withStyles(styles)(SimpleTable);