I'm looking to add a ripple effect to the Material UI Table. I've tried a whole bunch of solutions but none of them quite seem to work perfectly. They all have their own quirks.
I did find this article, but not much effort was put into a solution. My trials so far seem like they could lead to a possible solution (hopefully)? My table rows either end up being the wrong height (and not taking up multiple columns) or they end up being weirdly centered.. not sure how to handle.
https://codesandbox.io/s/pmry2x11vj
<div className="App">
<Router>
<Grid container>
<Grid item xs={12}>
<Card>
<Table>
<TableBody>
<TableRow hover>
<TableCell>test</TableCell>
<TableCell>Property</TableCell>
</TableRow>
<TableRow
hover
component={Link}
to={"/"}
style={{ textDecoration: "none" }}
>
<TableCell>Other</TableCell>
<TableCell>Row</TableCell>
</TableRow>
<ButtonBase style={{ width: "100%", height: "100%" }}>
<TableRow
hover
component={Link}
to={"/"}
style={{ textDecoration: "none" }}
>
<TableCell>row</TableCell>
<TableCell>is weirdly centered</TableCell>
</TableRow>
</ButtonBase>
<ButtonBase style={{ width: "100%", height: "100%" }}>
<TableRow
hover
component={Link}
to={"/"}
style={{
textDecoration: "none",
width: "100%",
height: "100%"
}}
>
<TableCell>row</TableCell>
<TableCell>
not right height, missing space on right
</TableCell>
</TableRow>
</ButtonBase>
<TableRow
hover
component={Link}
to={"/"}
style={{
textDecoration: "none",
width: "100%",
height: "100%"
}}
>
<ButtonBase style={{ width: "100%", height: "100%" }}>
<TableCell>row</TableCell>
<TableCell>
not right height, missing space on left / right
</TableCell>
</ButtonBase>
</TableRow>
<TableRow>
<TableCell style={{ width: "100%", height: "100%" }}>
<ButtonBase style={{ width: "100%", height: "100%" }}>
Extra
</ButtonBase>
</TableCell>
<TableCell>Normal Row</TableCell>
</TableRow>
<TableRow>
<TableCell>Extra</TableCell>
<TableCell>Normal Row</TableCell>
</TableRow>
</TableBody>
</Table>
</Card>
</Grid>
</Grid>
</Router>
</div>