Advertisement
Guest User

Untitled

a guest
Jun 27th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <Paper className={classes.root}>
  2.             <Table>
  3.               <TableHead>
  4.                 <TableRow>
  5.                   <TableCell>Name</TableCell>
  6.                   <TableCell>E-mail</TableCell>
  7.                   <TableCell>Role</TableCell>
  8.                   <TableCell>Edit</TableCell>
  9.                   <TableCell>Delete</TableCell>
  10.                 </TableRow>
  11.               </TableHead>
  12.               <TableBody>
  13.                 {Object.keys(this.state.users).map((user, i) => (
  14.                   <TableRow key={i}>
  15.                     <TableCell>{this.state.users[i].name}</TableCell>
  16.                     <TableCell>{this.state.users[i].email}</TableCell>
  17.                     <TableCell>{this.state.users[i].role}</TableCell>
  18.                     <TableCell>
  19.                       <IconButton
  20.                        aria-haspopup="true"
  21.                        onClick={() => this.editUser(i)}
  22.                         color="inherit"
  23.                         className={classes.iconButton}
  24.                       >
  25.                         <Edit />
  26.                       </IconButton>
  27.                     </TableCell>
  28.                     <TableCell>
  29.                       <IconButton
  30.                        aria-haspopup="true"
  31.                        onClick={() => this.confirmDeleteUser(this.state.users[i].id)}
  32.                         color="inherit"
  33.                         className={classes.iconButton}
  34.                       >
  35.                         <DeleteForever />
  36.                       </IconButton>
  37.                     </TableCell>
  38.                   </TableRow>
  39.                   )
  40.                 )}
  41.               </TableBody>
  42.             </Table>
  43.           </Paper>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement