Skip to content

Commit 7598b05

Browse files
committed
Table rows are now clickable links to 360 view
1 parent c33b898 commit 7598b05

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

src/client/src/pages/DataView360/DataView360.js

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import {
55
Container,
66
Box,
77
Button,
8-
Link,
98
Table,
109
TableBody,
1110
TableCell,
@@ -36,6 +35,18 @@ const customStyles = theme => ({
3635
table: {
3736
minWidth: 700
3837
},
38+
tableRowEven: {
39+
backgroundColor: "#FFFFFF",
40+
"&:hover": {
41+
backgroundColor: "#E6F7FF"
42+
}
43+
},
44+
tableRowOdd: {
45+
backgroundColor: "#E8E8E8",
46+
"&:hover": {
47+
backgroundColor: "#CCEEFF"
48+
}
49+
},
3950
headerCell: {
4051
fontWeight: "bold",
4152
minWidth: 60,
@@ -83,7 +94,7 @@ class DataView360 extends Component {
8394

8495
renderParticipantsTable() {
8596
const {classes} = this.props;
86-
const tableRowColors = ["#FFFFFF", "#E8E8E8"]
97+
const tableRowColors = [classes.tableRowEven, classes.tableRowOdd]
8798

8899
let participantListGrouped = _.groupBy(this.state.participantList, "matching_id");
89100
participantListGrouped = _.reverse(_.sortBy(participantListGrouped, matching_group => {
@@ -112,8 +123,9 @@ class DataView360 extends Component {
112123
_.map(participantListGrouped, (row_group, index) => {
113124
return _.map(row_group, row => {
114125
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>
117129
<TableCell align="left">{row.first_name}</TableCell>
118130
<TableCell align="left">{row.last_name}</TableCell>
119131
<TableCell align="left">{row.email}</TableCell>

0 commit comments

Comments
 (0)