Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

made entire row clickable #522

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 22 additions & 15 deletions frontend/src/components/RouteTable.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -318,32 +318,41 @@ function RouteTable(props) {
const labelId = `enhanced-table-checkbox-${index}`;

return (
<TableRow hover role="checkbox" tabIndex={-1} key={row.route.id}>
<TableRow hover
component={Navlink}
to={{
type: 'ROUTESCREEN',
payload: {
agencyId: row.route.agencyId,
routeId: row.route.id,
},
query: props.query,
}}
style={{color: theme.palette.primary.dark, textDecoration: 'none'}}
role="checkbox"
tabIndex={-1}
key={row.route.id}>
<TableCell
component="th"
id={labelId}
scope="row"
padding="none"
style={{border:'none', paddingTop:6, paddingBottom:6}}
>
<Navlink
style={{color: theme.palette.primary.dark, textDecoration: 'none'}}
to={{
type: 'ROUTESCREEN',
payload: {
agencyId: row.route.agencyId,
routeId: row.route.id,
},
query: props.query,
}}
>
{row.route.title}
</Navlink>
</TableCell>
<TableCell
align="right"
padding="none"
style={{border:'none', paddingTop:6, paddingBottom:6}}
to={{
type: 'ROUTESCREEN',
payload: {
agencyId: row.route.agencyId,
routeId: row.route.id,
},
query: props.query,
}}
>
<Chip
style={{
Expand All @@ -367,7 +376,6 @@ function RouteTable(props) {
label=
{row.wait == null ? '--' : row.wait.toFixed(0) + ' min'}
/>

</TableCell>

<TableCell
Expand Down Expand Up @@ -423,7 +431,6 @@ function RouteTable(props) {
}

/>

</TableCell>
</TableRow>
);
Expand Down