|
5 | 5 | Container,
|
6 | 6 | Box,
|
7 | 7 | Button,
|
8 |
| - Link, |
9 | 8 | Table,
|
10 | 9 | TableBody,
|
11 | 10 | TableCell,
|
@@ -36,6 +35,18 @@ const customStyles = theme => ({
|
36 | 35 | table: {
|
37 | 36 | minWidth: 700
|
38 | 37 | },
|
| 38 | + tableRowEven: { |
| 39 | + backgroundColor: "#FFFFFF", |
| 40 | + "&:hover": { |
| 41 | + backgroundColor: "#E6F7FF" |
| 42 | + } |
| 43 | + }, |
| 44 | + tableRowOdd: { |
| 45 | + backgroundColor: "#E8E8E8", |
| 46 | + "&:hover": { |
| 47 | + backgroundColor: "#CCEEFF" |
| 48 | + } |
| 49 | + }, |
39 | 50 | headerCell: {
|
40 | 51 | fontWeight: "bold",
|
41 | 52 | minWidth: 60,
|
@@ -83,7 +94,7 @@ class DataView360 extends Component {
|
83 | 94 |
|
84 | 95 | renderParticipantsTable() {
|
85 | 96 | const {classes} = this.props;
|
86 |
| - const tableRowColors = ["#FFFFFF", "#E8E8E8"] |
| 97 | + const tableRowColors = [classes.tableRowEven, classes.tableRowOdd] |
87 | 98 |
|
88 | 99 | let participantListGrouped = _.groupBy(this.state.participantList, "matching_id");
|
89 | 100 | participantListGrouped = _.reverse(_.sortBy(participantListGrouped, matching_group => {
|
@@ -112,8 +123,9 @@ class DataView360 extends Component {
|
112 | 123 | _.map(participantListGrouped, (row_group, index) => {
|
113 | 124 | return _.map(row_group, row => {
|
114 | 125 | return <TableRow key={row.source_id}
|
115 |
| - style={{backgroundColor: tableRowColors[index % _.size(tableRowColors)]}}> |
116 |
| - <TableCell align="left"><Link href="#" onClick={() => this.handleGetParticipant(row.matching_id)}>{row.matching_id}</Link></TableCell> |
| 126 | + className={tableRowColors[index % _.size(tableRowColors)]} |
| 127 | + onClick={() => this.handleGetParticipant(row.matching_id)}> |
| 128 | + <TableCell align="left">{row.matching_id}</TableCell> |
117 | 129 | <TableCell align="left">{row.first_name}</TableCell>
|
118 | 130 | <TableCell align="left">{row.last_name}</TableCell>
|
119 | 131 | <TableCell align="left">{row.email}</TableCell>
|
|
0 commit comments