Add selected row style to tables

This commit is contained in:
Ken Hibino 2020-12-20 17:26:22 -08:00
parent 701c186bc3
commit ec34f52777
3 changed files with 18 additions and 6 deletions

View File

@ -260,7 +260,11 @@ function Row(props: RowProps) {
const classes = useRowStyles();
return (
<React.Fragment>
<TableRow key={task.id} className={classes.root}>
<TableRow
key={task.id}
className={classes.root}
selected={props.isSelected}
>
<TableCell padding="checkbox">
<Checkbox
onChange={(event: React.ChangeEvent<HTMLInputElement>) =>
@ -299,7 +303,7 @@ function Row(props: RowProps) {
</Button>
</TableCell>
</TableRow>
<TableRow>
<TableRow selected={props.isSelected}>
<TableCell style={{ paddingBottom: 0, paddingTop: 0 }} colSpan={7}>
<Collapse in={open} timeout="auto" unmountOnExit>
<Box margin={1}>

View File

@ -284,7 +284,11 @@ function Row(props: RowProps) {
const classes = useRowStyles();
return (
<React.Fragment>
<TableRow key={task.id} className={classes.root}>
<TableRow
key={task.id}
className={classes.root}
selected={props.isSelected}
>
<TableCell padding="checkbox">
<Checkbox
onChange={(event: React.ChangeEvent<HTMLInputElement>) =>
@ -331,7 +335,7 @@ function Row(props: RowProps) {
</Button>
</TableCell>
</TableRow>
<TableRow>
<TableRow selected={props.isSelected}>
<TableCell style={{ paddingBottom: 0, paddingTop: 0 }} colSpan={10}>
<Collapse in={open} timeout="auto" unmountOnExit>
<Box margin={1}>

View File

@ -281,7 +281,11 @@ function Row(props: RowProps) {
const classes = useRowStyles();
return (
<React.Fragment>
<TableRow key={task.id} className={classes.root}>
<TableRow
key={task.id}
className={classes.root}
selected={props.isSelected}
>
<TableCell padding="checkbox">
<Checkbox
onChange={(event: React.ChangeEvent<HTMLInputElement>) =>
@ -325,7 +329,7 @@ function Row(props: RowProps) {
</Button>
</TableCell>
</TableRow>
<TableRow>
<TableRow selected={props.isSelected}>
<TableCell style={{ paddingBottom: 0, paddingTop: 0 }} colSpan={6}>
<Collapse in={open} timeout="auto" unmountOnExit>
<Box margin={1}>